Forum Discussion
how to create a query that paginates?
I cannot spot anything obvious.
Have never used it without the counter, but cannot see why this shouldn't work.
Do you know how many loops to expect?
Although it should be lazy evaluating - in case it doesn't, you can shorten the command like this:
Source = Web.Contents([SourceURI],[Headers=[#"Authorization​"="WRAP access_token=""client=XXX&user_token=YYY"""]]),
ImportedXML = Xml.Tables(Source,null,1252)[NextPageURI]{0}
],
each [SourceURI]
This should only retrieve the value from column "NextPageURI" in the first row {0}
Well actually, maybe it's this: Text.PositionOf([SourceURI],"N/A") = -1 : You're searching for something that shouldn't be there. Could you replace it by a positive identification?
Hi,
Just wondering if you ever got this to work?
I have almost the exact same need right now that I would like to resolve.
The API I am talking to has a starting URI and if it has more that 10 records to return it will paginate and provide in the initial response the "NextURI" for me to retrieve the next 10 records.
Appreciate any help I could get!