# Loop

![](https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2F1A0PhhHVCu5oQsVhvNkx%2Flist-loop-node.svg?alt=media\&token=01619408-e45d-41c7-9303-c5f3f24c5869)

The loop node makes it possible to loop through all the rows in a list or a multi-select field. When a loop node is dragged onto the canvas, a popup appears where you can select the list or multi-select field over which we need to loop.

When the node is selected the following properties can be specified:

![Price history is sublist of its parent products](https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2Fvo0H2IRaxRoT5FPqwqLW%2FScreenshot%202026-03-30%20131653.png?alt=media\&token=b40d3da7-06df-4fdc-b48b-179c6070adba)

<table data-header-hidden><thead><tr><th>Item</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>Item</td><td>Description</td><td></td></tr><tr><td><strong>Data List</strong></td><td>This is the list or field that is used for the loop. This property is set by WEM and cannot be changed.</td><td></td></tr><tr><td><strong>Limit to parent row</strong></td><td>When turned on, only direct children of the current row are considered. When turned off, all rows of this list are considered, also those of other parent rows. </td><td></td></tr><tr><td><strong>Loop over rows that match</strong></td><td>Specify over which rows we need to loop. There are two possibilities:  1.  All rows in the list or field 2.  A selection of rows that match a certain condition. This condition can be specified using the WEM Expression Editor</td><td></td></tr><tr><td><strong>Edit loop order</strong></td><td>It is possible to create an expression that defines the order in which the application should loop over the rows. You can do this by clicking the <code>Edit order</code>’ button that appears when this action is selected. From here you can specify an expression and specify the order (ascending or descending).</td><td></td></tr></tbody></table>

A loop node has two different exits:

* Next row

  When a new row has been reached, the node exits with the `Next row` exit. In the flowchart the user has to make sure to return to the loop node, in order to loop over the remaining rows.
* End of loop

  When all rows have been looped over, the node exits with the `End of loop` exit.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wem.io/platform/wemmodeler/flowcharts/loop.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
