Loop Array Action
<AMLOOP TYPE="ARRAY" ARRAY="Text" RESULTVARIABLE="Text" DIRECTION="Text" DATASET="Text">
Loops through an AutoMate array, populating the specified AutoMate variable with the current element.
Supports looping the array “horizontally” (row by row, column by column) or “vertically” (column by column, row by row). Supports any size array of any dimensions.
Optionally populates a dataset with the array name and current index.
To perform an action on each element of data in an array.
Specifies the name of the array to loop. The array must be created and populated in earlier steps using the Create Array action and the Set Variable action.
Specifies an already-created variable that should be populated with the next data element on each successive loop. The variable must be created in an earlier step using the Create Variable action.
Specifies the name of a dataset to be created and populated with the current index.
Specifies the direction of looping.
horizontal: first dimension first, row by row, column by column.
vertical: last dimension first, column by column, row by row.
This action includes the Description tab for entering a custom step description.
More on setting custom step description
This action also includes the standard Error Causes and On Error failure handling options/tabs.
More on Error Handling Options
All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.
More on variables
More on expressions
More on the expression builder
NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.
<AMLOOP TYPE="ARRAY" ARRAY="myarray" RESULTVARIABLE="ArrayElement" DIRECTION="vertical" DATASET="ArrayIndexDS">