# 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:

![](https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2FV2yThJucAp2KJUl4H5e7%2FFlowchart-Loop%20node%20properties.png?alt=media\&token=e96cb40e-a4f2-4055-91aa-cf980b55ae86)

| Item                          | Description                                                                                                                                                                                                                                                                                                |   |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |
| **Data List**                 | This is the list or field that is used for the loop. This property is set by WEM and cannot be changed.                                                                                                                                                                                                    |   |
| **Loop over rows that match** | 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                                                                           |   |
| **Edit loop order**           | 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 `Edit order`’ button that appears when this action is selected. From here you can specify an expression and specify the order (ascending or descending). |   |

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.
