array.iterator action
This trigger action receives an array of data and iterates over each element in the array from the first item to the last item. Every time it is routed to, it will output the next element in the array.
Action
To access the array.iterator trigger action:
- In the Adding a trigger screen, under
Array click and drag
the array.iterator to the canvas.
Canvas
When dragged onto the canvas, the appearance of the action is a diamond with three routing points.
The left routing point (red) is the failure route. This route will be taken if the array to be evaluated results in an error.
The bottom routing point (gray) is the done route. This route will be taken when all the items in the array have been iterated.
The right routing point (blue) is the next route. This route will be taken when each item in the array gets iterated.
Form
Parameters
Name
|
Type
|
Required
|
Descriptions
|
---|---|---|---|
Input | Array | Yes | The array of items. |
Action variables
Name
|
Type
|
Description
|
---|---|---|
$(action.X.index) | Integer | The index of the element. |
$(action.X.value) | ANY | The element of the array that is currently being iterated. |
The following array iterator sample provides you an overview of using the array iterator with a step-by-step example: