π¦ Loop through a list
π¦ Loop through a list
The Iterate 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
- 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).
- loop (Stream): Signal triggered once per element to execute the associated processing.
- done (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 cartto the list input of the Browse a list block. - Bind the item output to a Calculate block to add each price to a
totalvariable. - Connect the loop 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 finished 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 completed output is triggered immediately.
Updated on: 04/03/2026
Thank you!
