Queries

How to Create a Custom Query

Custom queries can be created by clicking on New Custom Query on the dropdown menu that appears when you click on the Query menu button on the main application toolbar.  Alternatively, within the Query Window, you can create a new custom query by clicking on New Custom Query on the menu that appears when you click on the menu button at the right end of the Query toolbar.  Give the new query a name and select a query type. Queries can be either record-type queries or fact-type queries. There are 11 types of record-type query (one for each of the main record types, except 'Header'). There is only one fact type query.

Another approach, which if often preferable, is to copy an existing query (custom or standard) and modify the copy.  To do this, find the query you want to copy.  Within the Query Window, select the query you wish to copy in the Query list at the top of the window. Then click on the Query Menu button at the end of the Query toolbar, and choose Save As Custom Query from the dropdown list that appears. Give the saved copy a name.

Changes made to custom queries are saved as you make them. You can modify them whenever you want. By default, when you create a new record-type query it will be created initially with one column, giving the name of the record, and no filters. So a new unchanged record-type custom query will simply return all records in the current project, of the relevant record type, when you run it.

Fact queries are a little different. When first created they have five columns (and no filters). So a new unchanged fact-type query will simply return all facts (events and attributes) in the current project, when you run it.

To learn how to make changes to a custom query, see Query Window.

You can run a custom query from within the Query Window by choosing it at the top of the window and by clicking on the Run Query button Run Query button in the Query toolbar. Or you can run it at any time by clicking on the Query menu button on the main application toolbar, and choosing All Custom Queries which displays a list of custom queries.  It is also possible to control where else your custom query appears on this menu (see Query Window: General Tab).

Custom queries can be deleted either by using the Delete Custom Query command on the Query menu or from the All Custom Queries dialog.