π Loop Each Item in List

-
- enter
- This needs to connected to make loop a part of the flow
-
Control Output
- on complete
- This is where the flow logic goes once the loop has completed iterating over the list.
- This is where you would define what happens once the loop has finished executing.
- on step
- This is where the flow logic goes for each iteration of the loop.
- This is where you would define what happens for each item in the loop.
-
- items
- Takes a list of items
- Can be a list of texts, numbers, booleans, jsons or lists.
- Type: List
- start
- optional
- default value: 0
- defines where to start iterating through the list
- Type: number
- end
- optional
- default value: length of provided list
- defines where to end iterating through the list
- Type: number
- step
- optional
- default value: 1
- defines how many items to step through while iterating.
- Type: number
-
Data Outputs
- current item
- the current item loop is iterating through
- Type: Any
- index
- the current index loop is iterating through
- Type: number
-
Examples
- If items is of length 4, and you need to iterate through the entire list
- step = 1, start = 0, end = 4
- If items is of length 10, and you need to iterate through only even items of the list:
- step = 2, start = 0, end = 10
- If items is of length 10, and you need to iterate through only odd items of the list:
- step = 2, start = 1, end = 10
-
Tip
- For most cases, where you just need to loop through each item in list, leaving start, end and step to default values is good.
Video Tutorial