Navigation: ABC Library Reference > FileDropComboClass > FileDropComboClass Methods >====== ResetQueue (refill the filedrop queue) ====== | |
ResetQueue( [ force ] ), VIRTUAL, PROC
ResetQueue | Refills the filedrop queue and the COMBO's USE variable. |
force | A numeric constant, variable, EQUATE, or expression that indicates whether to refill the queue even if the sort order did not change. A value of one (1 or True) unconditionally refills the queue; a value of zero (0 or False) only refills the queue if circumstances require it. If omitted, force defaults to zero. |
The ResetQueue method refills the filedrop's display queue and the COMBO's USE variable, applying the applicable sort order, range limits, and filters, then returns a value indicating which item, if any, in the displayed lookup file already matches the target fields' values specified by the AddUpdateField method. A return value of zero (0) indicates no matching items; any other value indicates the position of the matching item.
For example, if the filedrop “looks up” the state code for a customer, and the current customer's state code field already contains a valid value, then the ResetQueue method positions the filedrop list to the current customer's state code value.
Implementation:
The TakeEvent method calls the ResetQueue method. The ResetQueue calls the PARENT.ResetQueue method, then enables or disables the drop button depending on the presence or absence of pick list items.
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.UpdateFields.AssignLeftToRight
SELF.Close
SELF.ResetQueue(1) !refill the updated queue
!position to new item
SELF.ListField{PROP:Selected}=SELF.GetQueueMatch(UserStr)
DISPLAY(SELF.ListField)
END
!procedure code
See Also: TakeEvent, FileDropClass.ResetQueue