I am scripting the DMT tool for some BAQ Exports, but I don’t see a way to set the company in the command line. By default the BAQ Export is exporting one companies data, but the Company it is exporting for is not the one I want exported. Here is my command line:
I guess I could make one user for each company to pull data, just seems like there should be a command line argument. I tried -Company=VE, but no luck with that.
Just getting into the DMT command line, but you could make your BAQ Cross-Company. You would need to either set the Company for witch one you want in the BAQ, or filter the cvs file.
The BAQ’s are cross-company, but I really only want to pull data from one company at a time. In speaking to the developers of DMT, they are talking about adding a command line switch for the company, so that should fix this issue once they do this. My current solution is to have a company specific user for each company so I can do date import and also data exports.
The Company field is required on every table, so DMT imports don’t need to be company specific, because import data will always hold the company. In fact, a single DMT import could be for multiple companies.
I asked if a parameter could be used for DMT data export, as that would allow the BAQ to use a param for selecting the desired company. The less elegant way would be to have multiple identical BAQ’s but each with a table criteria fixed to a single company.
A more flexible and much more “hacky” way would be to use a UD table to hold the company ID the BAQ is to be run for. Then in the single BAQ, have the main table joined to the UD table with the UD tables field that holds the desired company, linked to the company filed of the BAQ’s Main table.
Prior to executing the BAQ export DMT, execute an update DMT to set the company value in the UD table. Then when the BAQ export DMT is run the BAQ will limit the records based on the UD table’s field
Not that I have seen from the help, or any of the update notes. That would help with the company specific queries. I haven’t really needed it except for those types of issues.
Paul,
Running into the same issue.
I working in a multi-company instance - need to pull export data.
even when the BAQ is cross company it is not pulling out the data.
When I go into the different company the BAQ runs fine.
BTW - I am passing parameters via a UD Table that is updated on a dashboard - then clicking on Action I run the DMT script with -NOui to make it easier for the user.
I think I will have to set up four new users for this data export process.
That is what I ended up doing, setting up individual users that only had access to each company. I made it scriptable by making the users named DMT_XXX with XXX being the company ID. I have a github repository of the scripts I developed if you want to look them over. I keep the password for the DMT user as an environment variable
I am using a workaround by using the DMT to Update a UD table with the company needed. Then my BAQ is cross-company and includes the join to the UD field for filtering.