Modify Query

You change the search criteria for an existing query using the Modify Query command:

modify query NAME [user USER_NAME] {ITEM};
  • NAME is the name of the query you want to modify. If you are a business administrator with person access, you can include the User clause to indicate another user’s workspace object.
  • ITEM is the type of modification you want to make. With the Modify Query command, you can use these modification clauses to change a query:
    businessobject TYPE_PATTERN PATTERN REVISION_PATTERN
    owner PATTERN
    vault PATTERN
    [!|not]expandtype
    where QUERY_EXPR
    visible USER_NAME{,USER_NAME}
    property NAME [value STRING]
    add property ANME to ADMIN [value STRING]
    remove property ANME to ADMIN
    add property NAME [value STRING]
    remove property NAME
    add visible USER_NAME{,USER_NAME]
    remove visible USER_NAME{,USER_NAME]

These clauses are the same clauses that are used to define the initial query. When making modifications, you simply substitute new values for the old.

Although the Modify Query command allows you to use any combination of search criteria, no other modifications can be made. To change the query name or remove the query entirely, you must use the Delete Query command (for more information, see Delete Query) and create a new query.

For example, assume you have a query named “Product Comparison” with the following definition:

query “Product Comparison”
   businessobject *
   revision *
   type Perfume
   vault “Perfume Formulas”
   owner channel, taylor;

To this query, you want to add another owner for the search criteria. To make the change, you would write a Modify Query command similar to the following:

modify query “Product Comparison”
   owner channel, taylor, cody;

This alters the query so that it now appears as:

query “Product Comparison”
   businessobject *
   revision *
   vault “Perfume Formulas”
   owner channel, taylor, cody