Use the Query Builder
- Last Updated: October 13, 2023
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
You can easily customize this default data retrieval by using a tool called the Query
Builder, where you can define a WHERE clause and other
elements of a query much as you defined the FOR EACH statement in “Use
Basic ABL Constructs”.
To bring up the Query Builder for the CustQuery frame:
- Double-click on the frame background. Alternatively, select the Object
Properties button from the toolbar:
The property sheet for the frame appears, where you can define various frame properties:
- Click the Query button to bring up the Query Builder.
- To define a
WHEREclause ofState = “NH”, select the Where radio set button from the set of options at the top of the Query Builder. - Select State from the list of Customer
fields:
- Click the equal sign (=) button.This brings up the Enter Constant dialog box where you can enter the State value NH. The Query Builder provides the quotation marks for you:
- Click OK to return to the Query Builder.
- To add a sort clause
BY Cityto your query, select the Sort radio set button. - Select the City field by double-clicking on it or by
selecting it and clicking the Add>> button:
- Click OK to leave the Query Builder.
- Click OK again to leave the frame’s property sheet.
- Run your window again.The first Customer is displayed again, but this time it is the first Customer in the State of New Hampshire, sorted by City: