The Advanced Queries function allows you to build more intricate queries using operators such as AND, OR, and NOT, multiple selection of values to match, and grouping (parentheses) of query criteria to generate more refined results. You can define and save advanced queries, enabling you to quickly select from a list of frequently used advanced queries, rather than re-entering the numerous query parameters that compose this type of query. You can use either group or personal advanced queries. You can always save a personal advanced query, and if you have been given permission by your Administrator, you may also be able to save an advanced query for use by all users in a user group.
Advanced queries are managed by the Saved Query bar which appears on the Query Page below the status bar.
Using the Saved Query bar, you can define new advanced queries, edit or remove existing advanced queries, and run or preview an advanced query. Group level advanced queries are listed followed by the User Group name in square brackets.
Field Level Visibility in Advanced Saved Group Queries
Field Level Visibility is the feature that allows fields to be restricted by user group in various areas of ProblemTracker such as the Add, Edit, and View pages and in Queries and Reports. That is to say that the system can be configured such that each user group may see a different set of fields in each area of ProblemTracker. Therefore, when creating advanced saved group queries, all fields may not be displayed depending on field visibility settings for the group selected.
When a field is not visible to the user group selected in a advanced saved group query, the field will be set to the default value when the advanced saved group query is run. In most cases, this default value is "*", which will include all possible values for the field in the advanced saved group query results. In the case of the Deleted field, the default is "No" such that all records that have not been marked as deleted will be included in the advanced saved group query results.
If a personal or group advanced saved query was created before a field was made invisible to a user group, it is possible for this user group to see an invisible field in a clause in the "Query Phrase" section of the advanced saved query. Any clause containing a field that is now invisible to the user group will be "read only". This clause cannot be edited because it contains a field that has been restricted for the user group. However, the clause can be deleted from the advanced saved query.
Please contact your ProblemTracker administrator if you wish to include a field in an advanced saved group query that is not visible to the selected user group.
Building Query Phrases
The procedure for building an advanced query differs from a standard query in that multiple options for each field can be selected and / or excluded for advanced queries. This is done by composing various query phrases that will be combined to generate the query results. These phrases are constructed in the Query Phrase section of the Advanced Query page.
Logic operators and fields are selected for a query phrase in the first row of the Query Phrase section. A description of the fields in the first row of the Query Phrase section:
A yellow triangle will appear to the left of the second, third or fourth rows in this section based on the selection made for the third field in the first row. The yellow triangle indicates that more information is needed in that particular row to complete the query phrase. Table 1 describes the type of information that should be entered in rows 2, 3, or 4 based on the selections made in the first row.
Once the components of the query phrase have been selected, you can click on the Insert button to add the query phrase to the Full Query section. To add another query phrase, click on the Reset button and begin selecting options in the first row.
To edit a query phrase that has been inserted into the Full Query section, click on the query phrase, then click on the Edit button. Modify the phrase in the Query Phrase section, then click on the Update button. The query phrase will be updated in the Full Query section.
To delete a query phrase that has been inserted into the Full Query section, click on the query phrase, then click on the Delete button.
Define an Advanced Query
To define an advanced query, follow these steps:
Run an Advanced Query
To run an advanced query, follow these steps:
Preview an Advanced Query
Many times you may wish to verify the parameters of an advanced query before running it or perhaps modify it slightly before running it.
To preview, optionally modify, and run an advanced query, follow these steps:
Edit an Advanced Query
To edit an advanced query, follow these steps:
Delete an Advanced Query
To delete an advanced query, follow these steps: