Forum Discussion
How to use a value in a query as a looping query
I'm trying to use the data from an API of an application we use to manage construction projects.
The query only returns the first 100 rows and a link to the next page.
It keeps returning the next page until the last page, then the link stays the same.
Is there a way to use these links and put these all in one query so i can use all of the data?
The 'bookmark numbers' arent incemental.
Thanks in advance!
2 Replies
- lbendlin
Super User
Please check the convenience function here
https://learn.microsoft.com/en-us/power-query/handling-paging
- TheSimpleConstrRegular Visitor
lbendlin Thanks for your reply, i found these functions and pages when i've been working on it for the last 2 days.
I am very inexpirienced in these things , so i havent had any luck.
In the provided links there are these questions:
- How do you request the next page of data? --> Its in a column in the return of the 'first' query
- Does the paging mechanism involve calculating values, or do you extract the URL for the next page from the response? --> We extract the URL as a value (the complete URL)
- How do you know when to stop paging? --> When the 'currect' URL equals the 'next' URL
- Are there parameters related to paging (such as "page size") that you should be aware of? --> Don't think so, the query returns 100 values of data.
What is a next step for me?
I am very much willing to try, right now i'm just a little bit lost!