Logic Container
  • 1 Minute to read
  • Dark
    Light
  • PDF

Logic Container

  • Dark
    Light
  • 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.

logic-cotainer-mceclip0.png

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.

logic-cotainer-mceclip1.png

By Clicking on the Is Parallel switch, you can set your logic steps to run in parallel within their container.

logic-cotainer-mceclip2.png

Loop Over

Using the Loop Over option in a container can be done in couple of ways. Using this set of variables:
image.png
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:
image.png
The second step is the container with the loop over property:
image.png
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])
image.png

Make sure to set the payload_offset to multiple values
image.png
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}

image.png

image.png

Here is the rest action step:
image.png


Was this article helpful?

What's Next