- 1 Minute to read
- Print
- DarkLight
- PDF
Logic Container
- 1 Minute to read
- Print
- DarkLight
- PDF
Containers
You can group your Rivers using Containers by clicking on the Container Me button in any logic step. This will wrap the chosen step in a grey container.
You can drag and drop Logic Steps into Container or click on Add Logic Step button in order to create a new logic step in the current container.
By Clicking on the Parallel Steps toggle, you can set your logic steps to run in parallel within their container.
Loop Over
Using the Loop Over option in a container can be done in couple of ways. Using this set of variables:
In this example: seq4 returns a sequence of monotonically increasing integers (seq4 - wraps integers after reaching the maximum available integer available with 4bytes).
and setting up the generator function for the multiple values variable lst we can use loop over as follows.
The first step to generate the variable to loop by:
The second step is the container with the loop over property:
In this example lst = [[0],[1],[2],[3],..]
and i equals each column value.
- another instance is to pull a list from table at the first logic step and load it into variable lst.
Using Loop Over for Pagination
In order to use pagination inside a logic with rest action, you can use this use case:
In this use case we want to draw IDs from an existing table and put each time 500 of them in POST payload, to fetch their information.
First will make a list of offset numbers with 500 incremental jump between them and pass it into payload_offset (payload_offset = [0, 500,1000,1500,2000])
Make sure to set the payload_offset to multiple values
Next, we will create the payload with each offset (here we use order by to ensure the offset doesn't change the table's original rows)
Inside the rest action River we use, for example a post command with the payload {payload}