For Dashboard Designers Reference Iterate
Friday, March 15, 2019 9:54 PMIterate
Labels: :IA_Function:IA_Iterate
Inherits from: Function
Iterates over an array or object input. For each key-value pair in input data it triggers an iteration event with that pair.
There are two types of iteration:
- Parallel: all iterations will be triggered/started immediately in parallel
- Serial: next iterations will be triggered after an updateevent on the IA_Iterate function instance with thenextIterationparameter updated
Parameters
| Key | Description | Default value | Possible values | 
|---|---|---|---|
| data | Collection of values to iterate over | object or array | |
| iterationType | How the iterations will be made | serial | serialorparallel | 
| nextIndex | Specifies which item should be iterated next | null | integer | 
| nextIteration | Parameter should be updated with trueinserialmode to trigger next iteration | null | trueornull | 
If nextIndex item does not exist the iteration ends.
Outgoing triggers
An Iterate triggers following events:
Type: iteration
Occurrence: Triggered when the function executes for each key-value pair in input data.
Additional event properties (besides the inherited properties):
| Key | Description | Possible values | 
|---|---|---|
| data | Item data | any | 
| index | Item index | string | 
Type: iterationEnd
Occurrence: Triggered when there are no more items to iterate through or when nextIndex specifies an item that does not exist.