Skip to main content
sanjuktab2257
June 11, 2025
Question

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

  • June 11, 2025
  • 2 replies
  • 0 views

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
    June 12, 2025

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

    stefanhelzle0001
    June 12, 2025

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