Create a query by using the Query wizard

You can create a query in two ways. You can use the Query editor and Display editor to specify the filter criteria and fields to display, or you can use the Query wizard.

To create a query by using the Query wizard:
  1. Click Query and select Use Query Wizard.
  2. Click Query > New Query.
  3. In the Choose Record Type window, select Defect and click OK.
  4. You can use an existing query as a template in the Query wizard. This exercise does not use a template, so click Next.
  5. Use the Define how the query displays page to choose the fields from the Defect record type to display in the query results. To choose a field from the Fields pane, double-click it or drag it to the Display Format grid. Choose the following fields to display:
    • Headline
    • Owner
    • Priority
    • State
    Use the Sort Order column to specify the order in which to display the query results. Enter numbers in the Sort Order cells as follows:
    • Priority 1
    • State 2
    • Owner 3
    • Headline 4
    Use the Sort column to specify an ascending or descending sort order. Click the Sort cell for each display field once to set the ascending sort order. Click Next.
  6. Use the Select fields to use as query filters page to specify which fields to use as filters in establishing the query's selection criteria. Double-click the State field. Click Next.
  7. Specify the filters and selection criteria:
    1. Select Define Filter.
    2. Select Contains from the Operator list, and select the Not check box.
    3. Click Values. In the Select Values window, select Closed and Resolved and click OK. The query is now defined to return all records that are not in a closed or resolved state.
    4. Click Run to run the query.
  8. Examine the records that the query returns in the Results grid.
  9. Click File > Save as. Enter NotClosedorResolved in the Query Name field, and click OK to save the query in the Personal Queries folder of your workspace.