1 Reply Latest reply on Sep 19, 2012 10:25 PM by megharajdeepak

    In need of a App. which can examine .....

    aktell2007 Level 1

      Hi there,

       

      I'm in need of creating a Application in Flex AIR (mx) which could examine the text of one (1) textInputBox checking against a hard coded list or Xml list of any of the  previous data, and therefor[B] 'Preventing Duplicate Records' [/B]to be included! I'm talking here of a list with around 1200+ entries at the moment but growing! I only need the App. to check the existing list against the new text line and if it is a duplicated record to show an Alert - No need of text length or any other Validation at all just to examine and verification if or if not.

       

      Any ideas or help would be appreciated regards aktell2007

        • 1. Re: In need of a App. which can examine .....
          megharajdeepak Level 1

          If you have a list of array with 1200 entries, lets say

           

          var listData:Array = ['entry1', 'entry2', ....., entry1200];

           

          and if you have a variable which needs to be examined, lets say:

          var myText:String = 'someEntryValue';

           

          Then you can examine this value with  the array like this:

           

          if (listData.indexOf(myText) = = -1)

          {

                trace("myText value is not a duplicate. It's not found in listData!");           

          }else

          {

               trace("myText value is a duplicate");

          }