Add a stored query

Applies to User Roles:

System Administrator

You can add, edit, or run stored queries from the Query window, which is accessible from the form in Database Manager or from the Application search form. Data entered into the form is automatically entered into the Query window to form the query. Depending on your permissions, you can edit and run that query, or select a query from a list of stored queries.

In this example, a query is performed on a specific assignee for all contracts in Configuration Management. Once stored, operators or groups of operators can access the query and automatically generate a list of records without reentering the detailed search criteria.

Note You must have the capability word QueryAdmin or query.stored.mod operator record to add or edit stored queries.

To add a stored query:

  1. Click Configuration Management > Contracts > Contracts.
  2. Use the Fill function in the Assignee field to choose an assignee. For this example, Carlton Hulman was chosen.
  3. Click the More Actions icon and choose Expert Search.

    The Query form opens. The new query is displayed in the Query field. For this example, the query for Carlton Hulman is displayed as follows: assignee#"Carlton.Hulman"

    Note In Service Manager, you can use field name information in field help to identify the field names you want to use in your stored queries. To display field name information in field help, make sure one of the following conditions is fulfilled:

    • In the Windows client, the “Show context-sensitive help debug information” preference is enabled.
    • In the Web client, “viewcontexthelp=true” is appended to the URL before you log in.
  4. On the Query form, click Keys.

    Note: Do not modify the automatically-generated query string, assignee#"Carlton.Hulman", as it appears in the Query field.

  5. On The Key Window (keylist form), type a key number to select the number of positions for the assignee.name key in the query. For example, type the number 3 to select 3 positions.
  6. Click OK.

    The Sort Fields field in the Query Window is now modified to agree with the key definition you selected.

  7. On the Query form, click Store to create the querystored file.
  8. Fill in the following fields:

    • In the Access List field, type in the Query Groups or Operator Names that you want to have access to this query. If you want all users to have access, leave the list blank.
    • In the Name field, type a unique name for your query.
    • In the Description field, type an explanatory description.
  9. Click Add.

    The following message confirms your entry was successful: Query added to querystored file.

  10. Continue to further refine your search criteria, or click Search. You can also click any record in the list of returned records to view the details.

Related topics

Record retrieval
Retrieving records using the Query window method
Stored queries
The Database Manager utility
Using functions in a query

Create stored queries from the Query Maintenance form
Update a stored query
Append stored queries
Use like queries to search for a string of characters
Show context–sensitive help debug information

Stored query option definitions