Querying a Viewpoint
Viewpoint queries enable you to search for nodes in a viewpoint whose properties match your specified criteria.
While viewpoint searches enable you to search for nodes in a viewpoint by name or description only (see Searching for Nodes), viewpoint queries expand that capability in several ways:
- You can query on properties beyond just name and description.
- You can add multiple query filters with different property values to further refine your query.
- You can use different operators for different properties (such as finding nodes that were added between two dates).
Note:
You cannot query time labeled viewpoints.Considerations
- To add a property to a query filter, the following must be true:
- For List viewpoints, only node level properties can be selected. For Hierarchy viewpoints, node and relationship level properties can be selected.
- The user creating the query must be able to see the property in the viewpoint. The property cannot be hidden as a result of the user's data access or viewpoint security.
- Properties in viewpoints are either indexed (indicated by a
icon) or not indexed. Indexed properties include:
- Properties with stored defined values, including values that were
derived and stored. Properties whose values are derived or inherited
without being stored are not indexed.
Note:
Properties with the Derived and Stored default type are able to be queried only after a value has been either defined or derived and then stored for that property on a node. This is true even if you join the Derived and Stored query filter with an indexed property query filter using an AND statement. - Properties with a Specified default type, whether the default is configured at the application or node type level. Query results include matching nodes that use the specified default value or have an explicitly defined value.
-
CoreStats.Parent, which is treated as indexed for viewpoint queries and can be used in a query filter without another indexed property.
- Properties with stored defined values, including values that were
derived and stored. Properties whose values are derived or inherited
without being stored are not indexed.
- When combining multiple query filters:
-
For filters joined by AND, at least one property must be an indexed property.
-
For filters joined by OR, all properties must be indexed properties.
-
-
When querying on the
Core.Nameproperty, you can query for nodes in node types that have defined a default or alternate qualifier (see Working with Node Type Qualifiers). For example, if a node type in the query has a default qualifier of "A_" and an alternate qualifier of "C_", then querying for a node name of 100 will return nodes 100, A_100, and C_100. - The following
CoreandCoreStatsproperties are indexed properties, and they can be used in viewpoint queries without including another indexed property:Core.NameCore.Alternate NameCore.DescriptionCoreStats.ParentCoreStats.Created ByCoreStats.Created DateCoreStats.Last Modified ByCoreStats.Last Modified Date
- You can perform a query in the context of a request. The viewpoint query is run on the "After" state of the request.
Query Visibility
Private Queries
After you create a viewpoint query, you can save it so that you don't need to recreate it the next time you want to run it. When you save a viewpoint query, it is saved as a private query, which can only be viewed and run by the user who created it.
Public Queries
If you have at least Data Manager or Metadata Manager permission on the viewpoint, you can promote a private query to a public query, which can be viewed and run by all users who have access to the viewpoint in the query. See Promoting Viewpoint Queries.