Flow Control


ForEach loop is a statement for specifying iteration, which allows code to be executed repeatedly for all elements (items) of the selected data aggregate - e.g. Array or List.

In a header section are declared elements (items) and data aggregate. In a body section should be specified activity that will be executed for each item.

Before proceeding to the next iteration, the loop assigns value of the next data aggregate's element to the control variable. The name of the control variable can be changed in the Properties window (default is item).

You have to specify the type of data stored in the given data aggregate. Default is Object, but it can be changed to e.g. Int32 or String.

Parameter NameParameter TypeIn/OutDescription
Display NameLiteralInputchanges display name of the activity
TypeArgumentDropdownInputthe data type of element (item); select the appropriate option from the dropdown list
ValuesContext basedInputvariable (type: collection type or Object), refers to the collection over which the statement is to be repeated