Example: Creating Asset-Related Conditions for Queries on Lists
This example applies to queries on active and session lists. A list is typically populated automatically by one or more rule actions (see Rule Actions Reference). You can then query those lists to create reports.
For queries on lists, the Assets button on the query’s Condition tab is disabled. This therefore limits your ability to add an asset-related condition by means of a button. You can, however, use the Common Conditions Editor to create your query condition statements in queries on lists containing assets.
This example uses a query on a list that contains assets. The goal of this example is to use a list to collect asset information, and you would regularly query that list for this information. Specifically, you are looking for assets that belong to a specific category.
Model your network:
Assets are part of your network model. For complete information, see Modeling the Network.
Create your list:
Create a field-based active or session list containing assets fields. Details are in List Authoring.
Create your query:
This query is interested in looking at the list and getting assets that belong to a particular asset category. Details for setting general query attributes are in General Query Attributes.
Add your query conditions:
For our purposes, we want to look for assets that belong to a category.
-
On the Conditions tab’s Common Conditions Editor, locate the asset field of interest, for example, Asset ID. Use the InGroup operator for the field.
-
Click the ellipsis in the Condition column to display the Advanced Editor for the asset field.
The Advanced Editor provides the following options for the asset field:
Asset Options
Action
Asset
Expand the asset group nodes and select an asset group.
Zone
Expand zone nodes and select a zone.
AssetCategory
Expand the asset category nodes and select an asset category.
Note: The Asset options listed above are not available to all fields.
-
Specify your asset attribute of interest and browse to the desired resource URI to complete your condition statement.
For example:
In our example, we choose AssetCategory. We are interested in the Criticality category that is equal to High. A list of asset category groups is displayed, from which you can further expand to select the category you want. The query’s condition statement is then updated according to your selections, for example:
The query returns Asset IDs belonging to the asset category specified in the condition statement.