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.

16 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

Thanks for sharing this. Nice work!

I made a few changes to enable dynamic QueryID and ParameterID drop downs.

image

XLSX attached if interested.
EpicorQuery -BAQService.xlsx (122.5 KB)

2 Likes

Followed this guide step-by-step but can’t seem to get past this error to actually retrieve the data. I believe everything is setup properly. We are on the cloud version of Kinetic.

Any ideas what this might be ?

From the error it appears you are using either an invalid login or API key without proper access to the BAQ or BO.

You should start a new topic for yourself and reference this one if it applies to your issue as this one was previously solved. :slight_smile: