Selection Tree Path

Selection Nodes

Tree Transformation Rules

Walkthrough

The first step in creating an XML query is to select a branch of the XML tree. The selection tree path is a required component in XML queries.

Follow these steps:

1. Click the 'New' button in the Style Studio toolbar. This opens the 'New Asset' dialog box.

2. In the left panel, select the 'Query' node. In the right 'Types' panel, select the 'Personnel' data source, and click 'OK'. This opens the 'Query Wizard'.

3. Select the General tab. In the 'Name' field, type “all_employees”.

4. Select the Fields tab. Expand the 'name' node in the 'Database Fields' panel. Add 'lastname' and 'firstname' to the 'Query Fields' panel. Also add the 'id' node, then click 'Finish'.

 

5. (Optional) Select the Condition tab. Click a node in the tree to filter, and press the 'Add' button.

6. Use the menus to specify the first part of a condition. For example, to select employees from a particular department, click to select the dept_id field, and enter the following condition fragment from the menus:

[employee.dept_id][is][equal to]

 

7. To enter a value in the condition, click the “arrow” button at the right side of the condition, and select the 'Value' option. Then enter the desired value in the text field.

8. To use a variable in the condition, click the “arrow” button at the right side of the condition, and select the 'Variable' option. In the adjacent 'Name' field, enter a name for the parameter. (For example, enter “deptVar” as the parameter name.)

This is the name (case sensitive) by which you will refer to the parameter in hyperlinks, scheduled tasks, and scripts. If the condi­tion operator is “one of”, then the variable represents an array. Oth­erwise, it is a scalar value.

Note that the adjacent menu automatically chooses the 'equal to' or 'one of' operator to match your selection.

9. To use session data in the condition, click the “arrow” button at the right side of the condition, and select the 'Session Data' option.

In the menu, choose one of 'User', 'Roles', or 'Groups'. These parameters return information about the user who is currently accessing the report; respectively, the user name, the array of roles to which the user belongs, and the array of groups to which the user belongs.

10. Repeat the above steps to add additional conditions.

11. Press 'Finish' to exit the Wizard.

12. Select the 'employee' node on the schema tree.

13. Click on 'Select Record' to select the sub-tree as the output. This marks the node as a selected path. See Selection Nodes for more information.

 

<< 6.6.1 Querying XML or Web Service Data Source © 1996-2013 InetSoft Technology Corporation (v11.4) Selection Nodes >>