Use > JMX Reference > Modeling Methods > How to Define and View a Layout Selection for a TQL Query

How to Define and View a Layout Selection for a TQL Query

You can specify the attributes to include in the query results for each query node or relationship in a TQL query in the Element Layout tab of the Query Node Properties dialog box. Select the Select attributes for layout radio button and then select a CIT or relationship in the CIT pane. If you select Specific Attributes for the Attributes condition, only the attributes you move to the Specific Attributes pane are included in the query results for that element. If you select All for the Attributes condition, all of the available attributes are included in the query results for that element. In this case, you can select Exclude specific attributes and move selected attributes to the Excluded Attributes pane.

There is also an option to select attributes by qualifiers. If you select qualifiers in the Attributes with the following qualifiers field, all attributes that have the selected qualifiers are included in the query results for that element, in addition to the attributes selected in the Specific Attributes pane. In this case too, you can exclude selected attributes by moving them to the Excluded Attributes pane.

By default, the attribute settings you select for a CIT are automatically applied to its descendant CITs in the query results; however, the settings are not visible in the Element Layout tab of the dialog box. For example, if you select specific attributes to be included for the Database CIT, the same attributes are included for the Oracle CIT (a child CIT of Database), but if you select Oracle in the CIT pane, the Attributes condition displayed is None (the default condition).

You can then make an attributes condition selection for the child CITs themselves. If the parent CIT has All selected as the attributes condition, then the Specific Attributes option is disabled for the child CITs. If the parent CIT has Specific Attributes selected as the attributes condition, you can select All or Specific Attributes for the child CIT. If you select Specific Attributes, you can add more attributes by moving them to the Specific Attributes pane. These are included in the query results along with the attributes inherited from the parent CIT's setting. Similarly, you can select attributes from the parent CIT's setting to exclude for the child CIT, by moving them to the Excluded Attributes pane. If the parent CIT has qualifiers selected to determine the attribute selection, these are also inherited by the child CIT. If you select additional qualifiers to filter the child CIT's attribute selection, the combined set of selected qualifiers is used to filter the attribute selection for the child CIT.

When you change the type of a query node or relationship using the Change Query Node/Relationship Type dialog box, the attributes selection for that element is lost.

If you import a package with a query that includes an attributes selection that is invalid for the selected query node, or if you make an invalid attributes selection using the JMX console, the query can be saved successfully and a warning appears in the log.

Note The layout selection is not visible in the query results in the user interface. To view the query results with the selected attributes, access the JMX console, select TQL services, and invoke the calculateTqlAdHoc method.