π¦ Loop through a list
π¦ Loop through a list
The Loop through a list block allows you to iterate over each element of a list to process them individually, like a Foreach loop in programming.
This block is essential for automating repetitive processing on data collections, such as generating dynamic interfaces or performing aggregate calculations.
π₯ Entries
- in (Stream): Entry point that starts (or restarts) looping through the list.
- list (List/Table): The data source to browse. Can contain elements of any type (texts, numbers, objects, etc.).
π€ Outings
- element (Dynamic variable): Value of the current element during each iteration.
- index (Number): Numerical position of the current element in the list (starts at 1).
- out (Stream): Signal triggered once per element to execute the associated processing.
- end (Stream): Single signal triggered after the last element, marking the end of the loop.
π‘ Example of use
Scenario: Calculate the total of a shopping cart
- You have a basket variable containing a list of prices: [12.99, 5.50, 8.00, 3.25].
- Connect shopping cart to the list input of the Browse a list block.
- Bind the item output to a Calculate block to add each price to a total variable.
- Connect the out output to the execution flow of the Calculate block.
- At each iteration, the current price is added to the total (12.99 β 5.50 β 8.00 β 3.25).
- Once all elements have been processed, the end output triggers the display of the final total (β¬30.74) via a Dynamic Text block.
βοΈ Technical Details
- Type management: The type of the element output automatically adapts to the content of the list.
- Order of execution: Elements are processed sequentially, from first to last.
- Performance: Avoid blocking operations in the loop to avoid slowing down the flow.
- Edge case: If the list is empty, only the end output is triggered immediately.
Documented version: v1
Updated on: 06/09/2026
Thank you!
