Data stream action - Pagination issue

psyherin
Kilo Sage

Hi all,

I am trying to work out pagination on data stream action. I have setup the REST API and it seems to be working but the pages are not going through the loop. I am not sure what is wrong. I am getting the subtotal from the response body and the calculation is happening but the currentPages pagination variable doesnt get updated. 

The output shows data pages 1 of 5 but the query parameter "page" is always 1 so the records are all from page 1.

Any help is appreciated. 

 

psyherin_0-1695085345541.png

psyherin_1-1695085387540.png

psyherin_2-1695085421167.png

 

 

1 ACCEPTED SOLUTION

minso08
ServiceNow Employee
ServiceNow Employee

You should set the value of 'variables.currentPage' within the script after line#7

View solution in original post

1 REPLY 1

minso08
ServiceNow Employee
ServiceNow Employee

You should set the value of 'variables.currentPage' within the script after line#7