Ask (solicit query criteria:QueryListClass)

Top  Previous  Next

 

Ask( [ uselast ] ), DERIVED, PROC

Ask

Accepts query criteria (search values) from the end user.

uselast

An integer constant, variable, EQUATE, or expression that determines whether the QueryListClass object carries forward previous query criteria. A value of one (1) carries forward input from the previous query; a value of zero (0) discards previous input.

The Ask method displays a query dialog, processes its events, and returns a value indicating whether to apply the query or abandon it. A return value of Level:Notify indicates the QueryListClass object should apply the query criteria; a return value of Level:Benign indicates the end user cancelled the query input dialog and the QueryListClass object should not apply the query criteria.

Implementation:

The Ask method declares a generic (empty) dialog to accept query criteria. The Ask method calls the QueryListClass object's WindowManager to define the dialog and process its events.

The GetFilter method generates filter expressions using the search values set by the Ask method.

The Init method sets the value of the QueryListClass object's WindowManager.

Return Data Type:     BYTE

Example:

MyBrowseClass.TakeLocate PROCEDURE

CurSort USHORT,AUTO

I USHORT,AUTO

CODE

IF ~SELF.Query&=NULL AND SELF.Query.Ask()

 CurSort = POINTER(SELF.Sort)

 LOOP I = 1 TO RECORDS(SELF.Sort)

  PARENT.SetSort(I)

  SELF.SetFilter(SELF.Query.GetFilter(),'9 - QBE')

 END

 PARENT.SetSort(CurSort)

 SELF.ResetSort(1)

END

See Also:     GetFilter, Init, QueryListVisual