Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Batcho Macro only running one batch

Slushercw
8 - Asteroid

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):

 

ORGAMEX1000
ORGDISC1000
ORGMC_V1000
ORNAMEX2000
ORNDISC2000
ORNMC_V2000
ORTAMEX3000
ORTDISC3000
ORTMC_V3000

 

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. 

 

clipboard_image_0.png

 

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!

5 REPLIES 5
Paulteryx
11 - Bolide

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

 

Paulteryx
11 - Bolide

Nevermind, I noticed they're not the same. Let me take another look.

JosephSerpis
17 - Castor
17 - Castor

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.

 

Excel_Batch_Macro.png

TerryT
Alteryx Alumni (Retired)

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"

 

clipboard_image_0.png

 

Hope this helps.

 

Terry T

 

Paulteryx
11 - Bolide

Sorry for the initial confusion, try selecting Operand in your Action tool.clipboard_image_0.png

Labels