Forum Discussion
API returns 1 Product. I need to loop through and return all products into 1 table
- 5 years ago
No need to delete anything - Power Query always starts from scratch.
The standard approach is
- have a list of Product IDs
- construct the URL for each of them
- use Web.Contents() to fetch the data for each
- expand the result into additional columns
It will still have to call the API for each individual product which sounds cumbersome, but that seems to be your environment restriction anyway.
- 5 years ago
You add a custom column, and in its code specify
=Web.Contents([URL])
This will then translate into an "each" process that pulls the data from all the product pages. The column contents will read "binary" and will be clickable. Think of it as tables inside table cells.
You can then encapsulate that with your JSON parser or whatever the format is.
- 5 years ago
Thanks so much! A nights sleep and this just made sense this morning, a whole new M query world has just opened up for me.... Have a great day Ibendlin!
No need to delete anything - Power Query always starts from scratch.
The standard approach is
- have a list of Product IDs
- construct the URL for each of them
- use Web.Contents() to fetch the data for each
- expand the result into additional columns
It will still have to call the API for each individual product which sounds cumbersome, but that seems to be your environment restriction anyway.
Thanks for the direction, I'll see how I go with this approach.