Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Create an XML Iterator Type XML Variable for Grid Items

Create an XML Iterator Type XML Variable for Grid Items

  • Last UpdatedJun 25, 2024
  • 2 minute read

XML Iterator type XML variable is used to iterate though the child items (grid items) of a list item in a workflow.

To create an Xml Iterator type Xml Variable for grid items

  1. Right-click the Start Activity and select Activity Properties from the options.

  2. Click the More button in the XMLVariables field. The existing list of XML variables is displayed.

  3. You have to create an XML List Iterator type XML variable before creating XML Iterator type XML variable. If you have already created XML List Iterator type XML variable, you can proceed to the following step. See Create an XML List Type XML Variable to create XML List XML variable.

  4. Click New Variable to add a new variable.

  5. Type a variable name in the Variable Name field.

  6. Select XML Iterator from the Type drop-down list.

  7. Select an XML Variable from the Xml Variable drop-down list.

    Note: If you need to loop through the grid items of an item while iterating through the list items, you need to select the respective XML List Iterator type XML variable.

  8. Select a repeating node from the Node Select drop-down list. Select the XML node which is mapped for the grid in the list.

  9. Click Save Variable. A message is displayed saying 'Variable Updated'. Close the window.

    Note: The user is unable to get the immediate values or attributes for the root node, if it was repeating.

Example

Consider an XML Schema

<EmployeeDetails>

<Employee Name='John'>ID123</Employee>

<Employee Name='Ken'>ID222</Employee>

</EmployeeDetails>

In this case, the repeating element is Employee. From the workflow, the user was unable to view the Name and ID values in runtime.In the above case, the repeating Element being Employee, from the workflow, the user was unable to view the Name and ID values in runtime. In order to view the values, the user had to build the schema in the following pattern.

<EmployeeDetails>

<Employee>

<Emp Name='John'>ID123

</Emp>

</Employee>

<Employee>

<Emp Name='Ken'>ID222

</Emp>

</Employee>

</EmployeeDetails>

TitleResults for “How to create a CRG?”Also Available in