Working with Saved Viewpoint Queries

Copying Viewpoint Queries

You can copy public queries, and any private queries that you created. When you copy a query, it is saved as a private query. Data Managers and Metadata Managers can promote it to public.

To copy a query:

  1. In the Query Panel, click Actions Actions, and then select Copy.
  2. Enter a name, and optionally a description, and then click Save.

    Note:

    The Visibility field indicates that the query is saved as a private query. If you have Data Manager or Metadata Manager permission on the viewpoint you can promote it to a public query.

Inspecting Viewpoint Queries

Inspecting a viewpoint query enables you to view the query definition and parameters, and to change the query name and description. You can also assign a code to the query to use instead of the query name when automating the query via the REST API.

To inspect a query:

  • From an open viewpoint: Click Query Viewpoint query viewpoint tab to display the list of saved queries for that viewpoint. Then, click the Query action menu query actions next to the query that you want to inspect and select Inspect.
  • From an open Query in a viewpoint: Click the Query action menu query actions next to the Run button, and then select Inspect.
  • From the Viewpoint inspector:
    1. Inspect the viewpoint that contains the query. See Inspecting a Viewpoint.
    2. On the Queries tab, click the name of the query that you want to inspect.

To edit the query name and description, or to assign a code to the query:

  1. On the General tab of the query inspector, click Edit.
  2. Edit the name and description.
  3. In the Code field, enter a code for the query.

    The code that you enter can be used in the queryCode parameter in the Run a Viewpoint Query Profile REST API instead of the queryName to identify the query in the API. This allows the query name to be changed without any effect to automated processes.

  4. Click Save.

Promoting Viewpoint Queries

You must have Data Manager or Metadata Manager permission on the viewpoint in order to promote a query.

To promote a query:

  1. Perform an action:
    • From an open viewpoint, click Query Viewpoint query viewpoint tab to display the list of saved queries for that viewpoint.
    • Inspect the viewpoint that contains the query that you want to promote. See Inspecting a Viewpoint.
  2. Click Action query actions next to the query that you want to promote, and then select Promote.
  3. Click Save.

    Note:

    If the query that you promote has the same name as an existing public query, an incrementing numeric suffix is appended to the query to make it unique.

Deleting Viewpoint Queries

You can delete your private queries from the Query panel or the viewpoint inspector. If you have Data Manager or Metadata Manager permission on the viewpoint, you can delete public queries as well.

To delete a query:

  • From the Query panel in a viewpoint: From the list of queries in the Query panel, click the Query action menu query actions next to the query that you want to delete, and then select Delete.

    Tip:

    If you already have a query open and you want to go back to the query list, click the Query Viewpoint query viewpoint tab tab to return to the list of saved queries.
  • From the Viewpoint inspector:
    1. Inspect the viewpoint that contains the query that you want to delete. See Inspecting a Viewpoint.
    2. Click Action query actions next to the query that you want to delete, and then select Delete.
    3. Click Save.