I created a batch macro that loads data from a database with a number of parameters: 1. Date (read with control parameter tool), 2. filter criteria (another control parameter that updates field to use for join), 3. list of values to use in join (as macro input).
Now what I want to do, is to set up a workflow that will execute that macro for a list of dates (giving me data snapshots from multiple months). I tried passing a list of dates as the date parameter, but that does not work - the first date on the list is selected multiple times. Does anyone have any tips how I could build such a workflow?
Solved! Go to Solution.
Hi!
I'm struggling to understand the issue here.
Would it be possible to share screen shots about your configuration and what you are trying to achieve.
Ben
Hi Ben,
I added a screenshot of macro workflow.
The macro works fine if I pass a single set of values that are read by control parameters, what I'd like to achieve is to run it multiple times for different dates and append the results.
t turns out that there was an error with the macro I built - the 'Replace a specific string' option was not working for some reason, and the macro always executed with the date set up in the macro input tool.
I replaced that with updating a cell in a Text Input tool, wrote a formula to create a SQL query (adding the cell value to a string) and passed that to Dynamic Input In DB tool:
After that change, if I pass multiple date parameters to a macro it executes for each of these - test setup to illustrate:
The takeaway is to avoid using 'Replace a specific string' option if possible ;)