Skip to main content
sanjuktab2257
Inspiring
Jun 11, 2025 10:26 PM UTC
Question

How to apply "while scenarios" in below mentioned scenario.

We call the expression rule (ER) "cursor_value_from_previous_call" from the "Cursor" integration.

This ER invokes another expression rule, "CursorValue," which extracts the cursor value from the integration's response body.

The extracted value is then passed to ER "cursor_value_from_previous_call," which returns the JSON value in the following format:

Request Body:

{
"cursor": {
"value": ""
}
}

Value is null for the first call, for other subsequent calls, we pass the value that we have extracted from the first call.

Kindly refer the flow diagram below:


I am not able to achieve this without using the logic of while loop. For loop is not helping as the variables are immutable. 
Any insights are highly appreciable.

    2 replies

    shubhama926776
    Brainy
    Jun 12, 2025 5:37 AM UTC

    Use recursive expression rules to handle pagination without while loops
    Remember: The recursion depth limit in Appian is 50 by default

    शुभम्
    stefanhelzle0001
    Brainy
    Jun 12, 2025 5:44 AM UTC

    Please explain the broader use case. In case you try to import data into Appian, did you consider using a synced record?