Hello Everyone,
I am trying to define paging steps for a web service connector.
The paging steps for the user endpoint is as follows:
The endpoint is defined with a query parameter range followed by two numbers seperated by the character “-” EX: /users?range=0-50
the first number represents the Offset (which we will be incrementing to return next results) and the second number represents the number of object returned.
Therefore if we want to display the next results in the example provided we would use /users?range=50-50
I tried to implement this logic in IDN with the following code
$sysparm_limit$ = 50
TERMINATE_IF $RECORDS_COUNT$ < $sysparm_limit$
TERMINATE_IF $NO_RECORDS$ == TRUE
$offset$ = $offset$ + $sysparm_limit$
$endpoint.fullUrl$ = $application.baseUrl$ + "/users?range=" + $offset$ + "-50"
But in this did not work
I tried to change the logic by putting the whole offset value in one variable
$sysparm_limit$ = 50
TERMINATE_IF $RECORDS_COUNT$ < $sysparm_limit$
TERMINATE_IF $NO_RECORDS$ == TRUE
$offset$ = $offset$ + $sysparm_limit$
$offsetString$ = $offset$ +"-50"
$endpoint.fullUrl$ = $application.baseUrl$ + "/users?range=" + $offsetString$
But for this logic the variable $offsetString$ was defined as 0
I even tried to user the HTML encoding - instead of the - but it did not solve my issue.
Has anyone encountered a similar issue? and if yes can someone guide me to a solution?
Best regards