XenoGuard Documentation

For Each

Actions » Programming » Flow Control » For Each 

The For Each action allows you to iterate and process all elements of a parameter list individually. For Each has an inner node in which you can embed the actions that are repeatedly executed in the loop.


[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. In the Flow Control node, select the For Each action.

Parameters:

The action has the following input parameters:


name Description
List Reference The reference to a specified list to be iterated.

Allowed Context Scopes
[Local reference]

Results:

The action returns the following results:

name
description
Data The root node of the data after the iteration.
Row Contains the current index of the executed loop.

Allowed Context Scope [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Result]

Information The sub-elements of Row are created dynamically and contain the currently read data after each loop cycle.

Example 1 (Loops through the items in a list):

This example reiterates and displays the items of a local list named Consumer Product. The Result is then output via Message Box.


Example 2 (Display the name and size of a file in a folder):

This example iterates the contents of a local folder named music. The value of the File is truncated and the iterated data is then output via Message Box.


See other flow control actions:

If
For Loop
While
Break
Label
GoTo
Parallel
On Error Continue
On Error GoTo
Abort
Abort on Error