So, I have a workflow that I am trying to utilize my first batch macro on. There's more than what's shown in order to get to the inputs, but I have attached the necessary files. Basically I have data for 3 locations (far left column is location):
ORG | AMEX | 1000 |
ORG | DISC | 1000 |
ORG | MC_V | 1000 |
ORN | AMEX | 2000 |
ORN | DISC | 2000 |
ORN | MC_V | 2000 |
ORT | AMEX | 3000 |
ORT | DISC | 3000 |
ORT | MC_V | 3000 |
And I want to run a batch macro that performs an output for the locations one at a time. The only thing in my batch macro is a filter tool that has the specific string related to Location being changed.
For some reason, when I run the workflow, it only runs it for the criteria I originally put in the filter tool rather than dynamically changing the filter criteria. The goal is to get a different sheet in my output for each location - so ideally 3 sheets in one excel file (this part is done outside the macro though).
Probably an easy fix, but many of the batch macro tutorials I have seen haven't really helped to troubleshoot this.
Thanks in advance!
Solved! Go to Solution.
Greetings!
The reason the filter is running all the records together is that the values in your first column are all the same "ORG." In order to batch a table, there needs to be intuitive groups to batch by. In this case, if you want to run the data through the macro one at a time regardless, you will want to add a RecordID tool before the macro, then use that as your control parameter. This will tell the batch macro to run one time for each record.
Cheers,
Paulteryx
Nevermind, I noticed they're not the same. Let me take another look.
Hi @Slushercw I edited your macro you were nearly there just had to change the configuration. There is alternative to using a batch macro to write to the same location and create different sheets if your output is an excel file. I have included that alternative method in the attached workflow.
I think your ACTION tool may be the issue.
It looks like it is configured to update the CUSTOM FILTER expression of the FILTER tool, but the FILTER tool is configured as a BASIC FILTER (Simple mode), so we have to dig into the SIMPLE section and update the Operand - value="ORG"
Hope this helps.
Terry T
Sorry for the initial confusion, try selecting Operand in your Action tool.