Hello, I am trying to automate a report we regularly run. What I'd like is for workflow to perform a search, and then dump a metadata report from that search to a particular folder location. It seems easy enough, but I am unable to discover which tool I should be using. Is there a tool for this? If not, what methods do you use to automate report generation?
Question
Question
Can workflow generate metadata reports?
Replies
most likely you will need to use a SDKScript activity to run the search and export the results to CSV (or another format if you need).
But there are ways to us the built in search activity along with a custom query or update data activity. Basically, the Query/Update activity uses ODBC or direct connection, so it must always have the Document that it writes to available in the same format with the same name every time it runs. If writing to Excel or CSV, you need to be careful of the file locking so you do not want the workflow to run more that 1 instance at a time.
I use this kind of approach for several reports. What I do is include two files in a folder on the Workflow server; one "template" file with the desired columns/formatting, and another that is configured with the ODBC connection.
Inside my Workflow, I use a Script activity to copy the template and overwrite the second file (if the name doesn't change, the ODBC connection will remain intact). After the file is replaced, I use an insert data activity to build the report.
Next, I retrieve the file and send it as an email through another script, or I will import the electronic file into placeholder document in the repository so I can use the built-in email activity to send it as an attachment.
Lots of scripting to automate a simple search and report. I guess I will shout out for a feature request for reports to be automatically ran on a schedule based on set criteria.
Thanks for the help guys!
Just following-up on this question from a while back, is there now a way to automate metadata reporting that does not require a script?
Not currently.
Hi Vikki,
I actually figured out a way to do this without scripting, but it did require an ODBC direct connection. That file will also need to include ;ReadOnly=0; in order for it to fill in the details on the excel sheet. The basis must be a search, then using for each entry you can insert data to the table. here is sample image:
the conditional decision here is whether it gets written to the report or not, and not really relevant to just automating reports. Combine this with a scheduled rule and an email function you are good to go. It is important to note though that this would require you to put blank templates on the server if you want specific time period data, or you'll need to figure out some other way to overwrite and clear the rows before the data is written to the report.