GetQueueMatch (locate a list item)

Top  Previous  Next

 

GetQueueMatch( search value ), PROTECTED

GetQueueMatch

Locates the search value within the first field of the display queue.

search value

A string constant, variable, EQUATE, or expression containing the value to locate.

The GetQueueMatch method locates a value within the first field of the display queue and returns the position of the matching item. A return value of zero (0) indicates no matching items.

The Init method case parameter determines the type of search (case sensitive or insensitive) performed.

Return Data Type:     LONG

Example:

 

MyFileDropComboClass.TakeEvent PROCEDURE

UserStr     CSTRING(256),AUTO

 CODE

 CASE EVENT()

 OF EVENT:Accepted

 UserStr=CLIP(SELF.UseField)

 IF SELF.GetQueueMatch(UserStr) = 0     !if entered value not in

  SELF.Reset                            ! lookup file / queue

  IF SELF.Ask()=Level:Benign            !update the lookup file

   SELF.Close

   SELF.ResetQueue

   SELF.ResetFromItem(SELF.GetQueueMatch(UserStr))!position to new item

   DISPLAY

  END

  !procedure code

 

See Also:     Init