Use > Modeling > Introduction > Topology Query Language > Topology Query Language User Interface > Query Node/Relationship Properties Dialog Box

Query Node/Relationship Properties Dialog Box

This dialog box enables you to define the attribute conditions for the selected TQL query node/relationship.

To access

To access in Enrichment Manager, Impact Analysis Manager, and the Modeling Studio:

In the editing pane, right-click the required query node and select Query Node/Relationship Properties or double-click the required query node or relationship.

Note If you are using Enrichment Manager, select Query mode at the top of the editing pane to display the Query Node Properties option.

To access in DFM:

  1. To access from the Adapter Definition tab, select an adapter. Click the Edit Input Query button to the right of the Input Query box to open the Input Query Editor.

  2. Right-click the required query node/relationship and select Query Node Properties or Relationship Properties or double-click the required query node or relationship.

Relevant tasks

User interface elements are described below:

UI Element (A-Z) Description
Element name (Optional) The Element name box contains the name of the selected query node/relationship. By default, the CI type is assigned as the element's name. You can rename a TQL query node in the Element name box giving it a unique label. This can be helpful when there is more than one query node of the same CI type in the TQL query.
Element type

Displays the CI type of the selected query node. If you want to change the query node type to a child of the original type, select a subtype from the drop-down list.

Note  

  • If you have already defined a complex type condition for the query node, the condition is lost when you change the query node type.
  • This feature is only available in the Modeling Studio.
Include subtypes

Select to display both the selected CI and its children in the topology map.

Note This feature is only available in Enrichment Manager and Impact Analysis Manager.

Query Result

Click Query Result to display a topology map of the TQL query showing the number of instances of each query node/relationship.

Note This feature is only available in the Modeling Studio.

Show element in query results

Select Show element in query results to display the selected TQL query node in the editing pane. When this option is cleared, a Hidden in Query Results indicator appears to the right of the selected TQL query node in the editing pane.

Any query results pertaining to that TQL query node are not displayed in the topology map. This can be useful when certain relationships or TQL query nodes are required to build the query but are not needed in the results. For example, Windows are connected to the IP Subnet by defining specific IP Addresses, but in any query results you may want to view the IP Address elements only and not the Windows elements.

Attributes Tab

This tab enables you to create an expression defining conditions that restrict the number of query nodes that appear in the query. You can add an attribute condition to a query node or relationship and filter the query results.

To access Click the Attributes tab in the Query Node/Relationship Properties dialog box.
Important information

Each row represents an attribute condition that you specify. Use the And/Or column and the Brackets columns to link multiple conditions. In this way, you can construct a more precise logical statement to generate the required results.

Note  

  • This tab is not available for calculated relationships.
  • When you access the Query Node/Relationship Properties dialog box in Modeling Studio, this tab is read-only for Enrichment and Impact type queries for which an Enrichment rule or Impact rule is defined.
Relevant tasks

User interface elements are described below:

UI Element (A-Z) Description
Add. Adds an attribute condition row. Select the attribute name, operator, and value to define the attribute condition.
Delete. Deletes the selected attribute condition.
Up. Moves the selected row up.
Down. Moves the selected row down.
Show Criteria. Displays the criteria of the selected condition in a pop-up dialog box.
Advanced layout settings

Opens the Layout Settings dialog box which enables you to determine which attributes are used in the calculation of the TQL query when querying the CMDB using third-party or custom tools.

Note This feature appears only in Enrichment Manager and Impact Analysis Manager.

And/Or Click inside the And/Or field and select either And or Or to link multiple conditions.
Attribute name

Select an attribute from the drop-down list.

Note When you select one of the following attribute types: float, double, or long, the In operator is not available.

Brackets Click inside the Brackets box to display a list of brackets you can use to build more complex, logical statements.
Criteria Contains the attribute condition definition as defined in the CI Instances dialog box.
Default Value For parameterized attributes, enter a default value for the parameter.
NOT

Select NOT if you want the condition statement to do the opposite of what is defined.

Note If you select NOT, query results do not include data from the CI instances that were not assigned a value. For example, your system contains three nodes: Node1 is assigned the value A, Node2 is assigned the value B and Node3 is not assigned a value. You create a query to retrieve all nodes that are equal to A and select NOT; the results of your query only include Node2 because Node3 is not assigned a value.

Operator

Select the required operator. For details, see Attribute Operator Definitions.

Note When you select one of the following attribute types: float, double, or long, the In operator is not available.

Parameterized

Select Yes to define a parameterized value for the attribute. Select No to define a fixed value for the attribute.

Note This feature is only available in the Modeling Studio.

Value

Enter or select the value of the attribute. The Value options vary according to the attribute type you select.

Note You can paste a copied value into the window by pressing CTRL+v on the keyboard.

Cardinality Tab

In this area, you can define a relationship cardinality, which enables you to define how many CI instances you expect to have at the end of a relationship in your query result.

To access Click the Cardinality tab in the Query Node Properties dialog box.
Important information

Select the required relationship to which the selected query node is attached. Then define the lower and upper limits for including the query node at the other end of the relationship in the query results.

Each row represents a cardinality condition that you specify. Use the And/Or column and the Brackets columns to link multiple conditions.

You can define relationship conditions that enable the relationship's connecting query node to be included in the TQL query results by creating an expression defining that condition. For an example, see Query Node/Relationship Properties Dialog Box.

Note  

  • This tab only appears when a query node is selected.
  • When you access the Query Node/Relationship Properties dialog box in Modeling Studio, this tab is read-only for Enrichment and Impact type queries for which an Enrichment rule or Impact rule is defined.
Relevant tasks

User interface elements are described below:

UI Element (A-Z) Description
Add. Adds a cardinality condition row. Select the query node and max and min values to define the cardinality condition.
Delete. Deletes a cardinality condition from the Cardinality area.
Up. Moves a selected row up.
Down. Moves a selected row down.
Show Criteria. Displays the criteria in a pop-up dialog box.

Inserts 1 in the Min box and * in the Max box.

Note Only relevant for the Modeling Studio.

Inserts 0 in the Min box and * in the Max box.

Note Only relevant for the Modeling Studio.

And/Or Click inside the And/Or field and select either And or Or to link multiple conditions.
Brackets Click inside the Brackets box to display a list of brackets you can use to build more complex, logical statements.
Criteria Contains the cardinality condition definition as defined in the CI Instances Dialog Box.
Max

Enter the value that defines the upper limits for including the query node at the other end of the relationship in the query results.

Note You can use an asterisk (*) in the Max box to represent an infinite value.

Min

Enter the value that defines the lower limits for including the query node at the other end of the relationship in the query results.

For example, if <end_1> is IpAddress and <end_2> is Windows, entering 1 in the Min box and asterisk (*) in the Max box instructs the system to retrieve only those IP Addresses that are connected to at least one Windows operating system. (The asterisk indicates an infinite value.) Entering 3 in the Min box and asterisk (*) in the Max box instructs the system to retrieve only those Windows operating systems that are connected to at least three IP Addresses.

Query Node Select the required relationship to which the selected query node is attached. The list contains all the relationships that are linked to the selected query node.
Not

Select NOT if you want the condition statement to do the opposite of what is defined.

Note If you select NOT, query results do not include data from the CI instances that were not assigned a value. For example, your system contains three nodes: Node1 is assigned the value A, Node2 is assigned the value B and Node3 is not assigned a value. You create a query to retrieve all nodes that are equal to A and select NOT; the results of your query only include Node2 because Node3 is not assigned a value.

Example of a Relationship Condition

The example of relationship conditions is based on the following TQL query:

In the Relationship Cardinality dialog box, the following relationship conditions are defined for the query:

  • Containment – Min: 2, Max: 4

  • Membership – Min: 1, Max: *

Using the OR operator, the definitions appear in the Cardinality section, as follows:

  • [Containment (Node, IP Address)] OR [Membership (IP Subnet, Node)] means that the node must either have between two and four IP Addresses OR be a member of the IP Subnet.

Using the AND operator, the definitions appear in the Cardinality section, as follows:

  • [Containment (Node, IP Address)] AND [Membership (IP Subnet, Node)] means that the node must have between two and four IP Addresses AND also be a member of the IP Subnet.

Note A cardinality of (0..0) is only valid when both ends of a relationship are defined with that cardinality. If one end is defined with cardinality (0..0) and the other end is defined with a different cardinality, the condition is invalid. However, the TQL query is saved (the cardinality has no effect on the query results).

Element Type Tab

This area enables you to specify subtype conditions for the selected query node or relationship.

To access Click the Element Type tab in the Query Node/Relationship Properties dialog box.
Important information

This tab is only available in the Modeling Studio.

This tab is not available for calculated relationships.

Relevant tasks

User interface elements are described below (unlabeled elements are shown in angle brackets):

UI Element (A-Z) Description
<Legend>

Indicates the icons displayed next to the subtypes based on the selected conditions:

  • Include the subtype without its descendants.

  • Include the subtype with its descendants.

  • Exclude the subtype without its descendants.

  • Exclude the subtype with its descendants.

CI Types/Relationships pane When Customize subtypes is selected, the CI Types pane displays a tree with all subtypes of the selected CI type (for relationships, the Relationships pane displays a tree with all subtypes of the selected relationship). After selecting conditions in Conditions pane, click the Preview Open the Input TQL Editor button to open the Conditions Preview dialog box.
Conditions pane For details, see Query Node/Relationship Properties Dialog Box.
Customize subtypes Select Customize subtypes to set a complex type condition. Select the required subtypes from the tree in the CI Types/Relationships pane and select conditions for them in the Conditions pane, as described below.
Element type Select Element type to set a simple type condition. If you want to include all subtypes of the selected CI type, select the Include subtypes check box. If you do not want to include all subtypes, clear the check box.

Conditions Pane

UI Element (A-Z) Description
Apply this condition recursively on all subtypes of <selected CI type> Select this check box to apply the specified condition for the selected CI type to all of that CI type's descendants, recursively.
By CI types Select By CI types to include or exclude all instances of the selected CI type in the query results.
By qualifiers Select By qualifiers to include or exclude instances of the selected CI type with specific qualifiers in the query results. A pop-up window appears with a list of qualifiers. Select the required qualifiers for the selected subtype. For details on the qualifiers, see Qualifier Tab.
Condition

Select a condition for the selected CI type. The following options are available:

  • None. No condition is selected for this CI type. Instances of this CI type and all its descendants are included in the query results, unless a parent CI type of this CI type was selected for exclusion and the Apply recursively check box was selected.

  • Include <selected subtype> in the query. Includes instances of the selected CI type in the query results (according to the condition selected). An example of a situation where this option is relevant is where a parent of the CI type was selected to be excluded and the Apply recursively check box was selected. You can select certain subtypes to be included, so the query results exclude all subtypes of the parent CI type except for the specified ones.

  • Exclude <selected subtype> from the query. Excludes instances of the selected CI type from the query results (according to the condition selected).

Element Layout Tab

This area enables you to select the attribute values returned in the query results for the selected query node or relationship.

To access Click the Element Layout tab in the Query Node/Relationship Properties dialog box.
Important information

When you make a selection of the attributes to include in the query results for a particular CIT, the selection also applies to all of its descendant CITs. You can manually exclude specific attributes for descendant CITs in the Conditions pane.

This option is only relevant when querying the CMDB API. The query results in the user interface are not impacted by the attributes you select in this dialog box.

This tab is only available in the Modeling Studio.

This tab is not available for calculated relationships.

Relevant tasks

User interface elements are described below (unlabeled elements are shown in angle brackets):

UI Element (A-Z) Description
<Legend>

Indicates the icons displayed next to the subtypes based on the selected attributes condition:

  • Include all attributes for this subtype.

  • Include only the selected attributes for this subtype.

CI Types/Relationships pane When Select attributes for layout is selected, the CI Types pane displays a tree with all subtypes of the selected CI type (for relationships, the Relationships pane displays a tree with all subtypes of the selected relationship). After selecting conditions in Conditions pane, click the Preview button to open the Element Layout Preview dialog box.
Conditions pane For details, see Conditions Pane.
No attributes If you select No attributes, no attribute values are returned in the query results for the selected query node or relationship.
Select attributes for layout If you select Select attributes for layout, you can select the attributes to be included in the query results for the selected query node or relationship.

Conditions Pane

UI Element (A-Z) Description
Attributes condition

Select one of the following options:

  • None. No attributes are included in the query results for the selected element.
  • All. All attributes defined for the selected element are included in the query results.
  • Specific Attributes. Only the selected attributes are included in the query results for the selected element.
Attributes with the following qualifiers

You can include attributes with specific qualifiers. Click the ellipsis button to open a dialog box with the available qualifiers and select the required qualifiers.

Note This feature only appears when you select Specific Attributes for the Attributes condition.

Available Attributes Displays all of the available attributes for the selected element.
Excluded Attributes

When All is selected as the Attributes condition, you can exclude selected attributes by moving them into the Excluded Attributes pane.

When Specific Attributes is selected as the Attributes condition for a CIT that has inherited an attribute selection from its parent CIT, you can exclude specific attributes from the selection by moving them to the Excluded Attributes pane.

Alternatively, if you select attributes with selected qualifiers for a CIT, you can exclude some attributes from that selection by moving then to the Excluded Attributes pane.

You can move attributes into and out of the pane using the arrow buttons.

Exclude specific attributes

Select this check box to enable the Available Attributes and Excluded Attributes panes and the arrow buttons.

Note This feature only appears when you select All for the Attributes condition.

Specific Attributes

Displays the attributes to be included in the query results for the selected element. Move attributes into and out of the pane using the arrow buttons.

Note This feature only appears when you select Specific Attributes for the Attributes condition.

Qualifier Tab

This area enables you to define qualifier conditions for the selected query node or relationship. For example, you can use a qualifier to define a CIT as abstract, meaning you cannot create instances from it.

To access Click the Qualifier tab in the Query Node/Relationship Properties dialog box.
Important information

By default, multiple selection links the conditions with the OR operator.

Note This tab is only available in Enrichment Manager, Impact Analysis Manager, and the Input Query Editor in DFM.

Relevant tasks

User interface elements are described below:

UI Element (A-Z) Description
<Qualifiers> For a list of the available qualifier options, see Qualifiers Page.
Negate Qualifiers If this check box is selected, then the element is included in the query results only if it has no qualifier in the list of selected qualifiers.

Identity Tab

This area enables you to filter the TQL query results according to the element ID of the instances found for the selected TQL query node.

To access Click the Identity tab in the Query Node Properties dialog box.
Important information

Move the required element from the Optional identities pane on the left to the Selected identities pane on the right to define what you want included in the TQL query results using the left and right arrows.

Note This tab only appears when a query node is selected.

Relevant tasks

The following elements are included (unlabeled elements are shown in angle brackets):

UI Element (A-Z) Description
<Toolbar> For descriptions of the toolbar buttons, see CI Instances Dialog Box.
Optional identities pane Displays all the instances found for the selected TQL query node.
Selected identities pane Displays the elements that are used to define what should be included in the TQL query results.