Passing Parameter to DMT -Export BAQ

I see information about using -EXPORT to extract BAQ data, but I do not see how to pass a parameter to the BAQ.

My BAQ prompts for a start and end date. How do I feed it those dates?

start C:\Epicor\ERPDT\Client-Pilot\DMT.exe -User=name -Pass=%PW% -Export -BAQ=“baqName” -Target=“C:\temp\001.csv” -NoUI -UseFieldNames

As far as I know, you cannot use parameters with a DMT BAQ export. you have to set the parameters manually as criteria in the BAQ and change it when you need to before you export again.

I would love to hear that I am wrong!

Thanks for the reply. I’m thinking that the REST API will need to be the approach.

Thanks again,

You could make your BAQ use values from a UD table in place of the parameters.

Then just do two DMT’s. The first to set the parameters in the UD table, and the second to run the BAQ export.

Sound like a good possibility

Thank You,

image002.png

What would the update Baq look like if I cannot pass parameter via powershell.

I did not want to open dmt and manually enter start and end date for extract.

R

image002.png

I guess it would be a three step process in your powershell

  1. Create the CSV file to that will be uploaded via the firs DMT call. This could be very simple. I think the following would work in a batch file
ECHO "Key1","Date01","Date02" > param.csv
ECHO "PARAMS","%1","%2" >> param.csv
  1. Cal the DMT to update the UD table with params.csv
  2. Call the DMT to run the BAQ

If you want to get fancy you could make your DM always link to the UD table and figure out which values (parameters or linked values) to use. If paramters are blank use what is in the UD table, else use the params