Loop Array Action—Setting Properties

The Loop Array action is used to set up a loop action on an array and populate a variable with the value of the current array element. It supports any size or dimension array. You can choose to loop the array by the first dimension or the last dimension, and you can optionally populate a dataset with a current index.

To set Loop Array properties

  1. From the Task Builder Available Actions pane, open the Loop folder and double-click the Loop Array action or drag it into the Steps pane.

  2. In the Array name box, select the array to loop.

  3. In the Populate variable with current element value box, select the variable to populate.

  4. To populate a dataset with an array index, enter a name for the dataset in the Create and populate dataset with current indexes box. (Dataset names must be alphanumeric, begin with a letter, and contain no spaces.)

    For a two-dimensional array, the dataset Dimension field is populated with either the column or row index depending on the selection made under Ordering (see below).

  5. For a multi-dimensional array, under Ordering, select First dimension first to loop horizontally (dataset is populated with column index), or Last dimension first to loop vertically (dataset is populated with row index).

  6. To set the Description tab properties, refer to Description Tab Options.

  7. To set the Error Causes and On Error tab properties, refer to Step Error Handling.

  8. When finished, click OK to save settings and close the properties dialog window.

To auto-indent after all steps are added

  1. In the Task Builder Steps pane, hold down SHIFT and click the first and last steps in the block so that the complete block of steps is selected.

  2. Click the Format button .

See Also

About Actions

Adding Task Steps

Loop Array Action