User Help > Displaying Items Meeting Specific Conditions > Creating a Query > To create a query in the Web interface
To create a query in the Web interface
1. In the Queries View, click Create Query.
2. Provide information on the General and Sharing tabs. For more information, see Query Properties.
3. Click the Query Definition tab and then click to add the required filters to the query. From the list that is shown, select one of the following:
To add the first filter or to add a new filter at the same level as an existing filter, select one of the following:
Add a field value filter
Add a text search filter
Add a sub-query filter
Add a history filter
Other Filters
Add a sub-expression to add a sub filter to an existing filter. The code and where or or where is added under the selected filter. Select the sub-expression, and click to add a filter. The Filter Editor dialog box displays.
The sub filter is added using the same operator as the main filter. To change the operator, select the sub filter, click , and select the new operator.
Any additional filters you add at the same level will be added with the same operator (AND or OR).
A sub-expression is a subset of criteria that applies to the parent filter. For example, if you had a filter that looked for two types of items, you could use a sub-expression for each to specify additional criteria. For example, if you were querying for Change Orders and Request For Change items, you could use a sub-expression on the Change Order filter to specify a Task change type and a sub-expression on the Request For Change filter to specify a Defect request type.
4. In the Filter Editor dialog box, define the filter criteria for the selected field or sub filter.
After you define a filter, it displays in the query definition.
If you do not define the filter, a generic filter line displays in the query definition with to indicate that the definition is incomplete. Select the filter and click Edit. After you define the filter, changes to in the query definition.
5. To customize the visible columns and sorting columns for the query, click the Default Columns tab. When you run the query, columns determine what item fields display in the Items view and how those fields are sorted. Customizing the default columns is useful if you want to use different columns for different queries. For example, you could sort the list of items by State in ascending order.
6. To save the query, select OK.