Query by Expression


The Query by Expression dialog box is available when viewing both forms and browses, and lets you filter and sort records by directly entering filter and order expressions. Query by Expression is primarily intended for experienced users who are more comfortable writing expressions than using Genies.


The Query by Expression dialog box is modeless, meaning you can leave it open while you continue to work with your form or browse. You can also specify sub-selection criteria for your queries. To use Query by Expression :

  1. Select Query > Query by Expression or click the following on the form or browse toolbar.

  2. Optionally, click the 'open folder' icon to display a list of saved queries.

  3. Optionally, click Current Query to load the current filter and order expressions for the layout.

  4. Optionally, enter a Filter Expression. The filter expression determines the records to display. Click  to open the Expression Builder.

  5. Optionally, check the Exclude matching records check box if you want to invert your filter expression.

  6. Optionally, enter an Order Expression. The order expression determines the order in which to display the filtered records. Click the 'xy' button to open the Expression Builder.

  7. Optionally, limit the records you retrieve by using a function in the Sub-select Options list.

  8. Optionally, make a selection from the Duplicates list. The options are:

    • "Allow records with duplicate sort keys"

    • "Exclude records with duplicate sort keys"

  9. Click the 'lightning' icon to execute the current query.

  10. Optionally, click the 'disk' icon to save the query for future use.

  11. Click the button to exit.

See Also