Articles on: Blocks Creator

🟦 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


  1. You have a basket ​​variable containing a list of prices: [12.99, 5.50, 8.00, 3.25].
  2. Connect shopping cart to the list input of the Browse a list block.
  3. Bind the item output to a Calculate block to add each price to a total variable.
  4. Connect the loop output to the execution flow of the Calculate block.
  5. At each iteration, the current price is added to the total (12.99 β†’ 5.50 β†’ 8.00 β†’ 3.25).
  6. 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

Was this article helpful?

Share your feedback

Cancel

Thank you!