XenoGuard 4.0 Documentation

For Each

ActionStep Reference » Programming » Flow Control » For Each 

The For Each ActionStep 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 ActionSteps 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 ActionStep.

Parameters:

The ActionStep 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 ActionStep 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 ActionSteps:

If
For Loop
Repeat Until

While
Break
Label
GoTo
Parallel
On Error Continue
On Error GoTo
Abort
Abort on Error