Pull REST data into Excel based on values on excel?

Dan

Sorry, im still having issues with this.

where doe this “value” come from?

mine looks like

/api/v1/BaqSvc/HDTA-Rebate/?FiscalPeriod=9&FiscalYear=2022", null, [Implementation=“2.0”])

I tried changing the =9 to =pPeriod

/api/v1/BaqSvc/HDTA-Rebate/?FiscalPeriod=pPeriod&FiscalYear=2022", null, [Implementation=“2.0”])

but this gives me the error above? My Parameter for pPeriod looks like the sample below that i feel is how it should look

Capture

REST-BAQ-Parameters-From-Columns.xlsx (17.9 KB)
Here is the full example, let me know if this helps.The BAQ had PartNum and Description as display columns and a parameter named PartNum.

1 Like

Thanks for the file, It was enough to get me to where i needed to go.

you had the ’ " & Value & " ’ "

I realised that i didnt need the last " as i had a second parameter also and the final " goes after that one.

Living and learning

Here is the sample file I presented at Insights. You can use this to generate a full REST url complete with filters, sorting, select columns, and the number of rows to return.

EpicorQuery - zHomepage_SOOpen.xlsx (112.7 KB)

The key is a function in Power Query Editor to read the full URL from a table and cell value. In the attached Excel example it is reading the URL from the ‘Parameters1’ table, and the 11th row of the ‘Value’ column and passing that into the EpicorBAQ query.

10 Likes

Nice Andrew!

Dan,
I just downloaded your example and it worked like a charm.
I’ve been pulling my hair out trying to download the partmtl table for an item.
Thanks bunches!!!
Mike