DOCS

Advanced Queries

The Advanced Query option is available in the context menus for subject areas and item types, for selected items, and in the Query menu when a subject area, an item type, or an item has the focus. The option provides a cascading menu with an Edit option and a list of previously defined advanced queries. You can run any one of them by clicking the pertinent entry in the list.

Metability supports advanced queries that were defined in AutoPilot.

Running an existing Advanced query using the Advanced Query dialog

  1. Select QueryAdvanced QuerySelect.
  2. The Advanced Query dialog opens with the Select Query tab in the foreground.

    This image shows the Advanced Query dialog.
  3. Select a query from the list. If you want to filter the list so that only some of the available queries are shown, you can use these options:
    • Select the empty entry in the Owner drop-down list to list all available queries, or any other entry to list only queries that were created by that particular user.
    • To filter the list by query name, enter a character string in the Query name filter field. You can use wildcard characters.

    After you made changes in any of these two fields, click the Refresh button to see changes in the Available queries list.

    These buttons are enabled when you select a query from the list:

    • Edit: Brings the dialog’s Edit Query tab to the foreground, displaying the query definition. You can modify the definition and then store it in the database.
    • Remove: Deletes the query. It is no longer available for execution.
  4. Specify runtime settings for the query.
    1. In the Run Settings list, you can specify values for these properties:
      • In Item location, you can specify if items are searched in all relevant configurations or only the work configuration.
      • In Scope of Search, you can specify if and how the items of the Item List tab are considered:
      • Do not restrict to items of the list - considers all items, independent of the items listed in the Item List tab.

        Restrict to items of the list - considers the items listed in the Item List tab (that is, items in the namespace of the listed items are not considered).

        Restrict to items namespace of the of the listed items - considers the items listed in the Item List tab and items in the namespace of them.

      • The Layout for advanced queries is fixed (that is, Table view).
    2. In the Item List tab, you can specify items for which the query will be applied.
    3. If you have initiated an Advanced query for a selected item list, this tab contains the selected items:

      This image shows the Item List tab in the Advanced Query dialog.

      You can use the icons in the Item List tab to add or delete items to the item list.

      In the Run Setting, if Do not restrict to items of the list is selected, the Advanced query does not consider items list in this tab.

  5. After you have selected a query and all runtime settings, click Run.

Running an existing Advanced query directly

> Select QueryAdvanced Query from the main menu bar. In the cascading menu that opens, select the desired query.

This image shows the cascading menu to select the desired query.

Creating a new Advanced query

  1. Select QueryAdvanced QueryEdit from the main menu bar.
  2. The Advanced Query dialog opens with the Edit Query tab in the foreground, where you can define a new query.

    This image shows the Edit Query tab in the Advanced Query dialog.
  3. Specify whether you want to link the filter conditions with AND (all conditions must be true), with OR (any of the conditions can be true), or with XOR (exactly one of the conditions must be true).
  4. Click the Add Filter button. The Add Filter dialog is displayed.
  5. This image shows the Add Filter dialog.

    The dialog is similar to the conditions area of the Search for Items dialog (see Item Search Queries).

    When you have finished defining a search condition, click OK to accept the defined condition, and to close the Add Filter dialog. The filter conditions are added to the Query definition field in text form.

    This image shows the filter conditions added to the Query definition.
    The filter conditions are shown in SDCAC representation. For more information, refer to the Rochade Command $SDCAC in the ASG-DI Administration Online Documentation.
  6. Repeat step 3 as many times as necessary.
  7. Click the Check Query Syntax button to check the query’s syntax. If the syntax is valid, the Query Name and Description edit fields are enabled.
  8. Enter a name for the query in the Name field, and optionally a short description in the Description field and then click the Save button to save the query.
  9. You also can click Run to run the query. The query result opens in the Editor frame.

Editing an Advanced query

  1. Select QueryAdvanced QueryEdit.
  2. The Advanced Query dialog opens with the Edit Query tab in the foreground.

  3. Click the Select Query tab to bring it to the foreground.
  4. This image shows the Select Query tab in the Advanced Query dialog.
  5. Select the query that you want to edit.
  6. Click the Edit button to bring the Edit Query tab to the foreground and display the definition of the selected query.
  7. Edit the query definition as described from step 2 to step 4 under Creating a new Advanced query.
  8. Click the Check Query Syntax button to check your changes. If the syntax is valid, the Query Name and Description edit fields are enabled.
  9. Click the Save button to save the query changes.
  10. Click Run to run the modified query.
  11. Or  

    Click Cancel to close the Advanced Query dialog.