User Tools

Site Tools


ask_solicit_query_criteria_2.htm
Navigation:  ABC Library Reference > QueryListClass > QueryListClass Methods >====== Ask (solicit query criteria:QueryListClass) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

Ask( [ uselast ] ), DERIVED, PROC

blk2blue.jpg

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

ask_solicit_query_criteria_2.htm.txt · Last modified: 2021/04/15 15:56 by 127.0.0.1