We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Batch Macro error: field schema changed

CosimaS
6 - Meteoroid

Hi, I was getting the following error from my batch macro:

Error: ScenarioMacro (24): Record #4: Tool #8: The field schema for the output "Output8" changed between iterations.

 

I tried going to Interface Designer - Properties and changing to "Auto Configure by Name", but found that it was only running the macro for the first record in the control parameter and then stopping--so the output was just one iteration. I then tried stripping everything out to figure out what was going on. I changed the macro to literally just grab the column names from the table, and then drop every field other than Name. So the output should just be the column "Name" every time, but it still throws the same error, and if it's set to "Auto Configure by Name" then it still only runs one iteration and then stops. I have no idea what's causing the problem at this point, can anyone help?

6 REPLIES 6
ChrisTX
16 - Nebula
16 - Nebula

For Record #4 going into the batch macro, which fields are present in the input data stream?

 

For your input data: Compare batched data streams 3,4,5.

 

Each batch of data will require the same number of fields from this [field name universe]:

   ('AdjustmentType','Provider','System','Specialty','Notes','My Scenario')

      where 'My Scenario' is the value fed into the Macro Control Parameter.

 

In other words.... if one input batch contains the field Provider and the next batch does not contain that field, you'll get the error "changed between iterations".  The error is mentioning "Output8", but the error is likely with your input data.

Can you use the batch macro option for "Output fields change based on macro's configuration or data input" ?

 

ChrisTX_0-1660237004627.png

 

 

Chris

CosimaS
6 - Meteoroid

It's the same input table every time, and it has the fields AdjustmentType, Provider, System, Specialty, Notes, plus all of the Scenario columns. The control parameter is a list of the names of those Scenario columns. I just tried using "Output fields change based on macro's configuration or data input", and I'm getting the same issue where it does one iteration and then stops.

ChrisTX
16 - Nebula
16 - Nebula

Is there any way you can post the main program and batch macro, even if you have to mock up some data and reduce your primary workflow to only the tools flowing into the macro?

 

Trying to debug macros can be tricky.  Not having input data allowing us to re-create the error makes it almost impossible to guess the cause.

 

Chris

CosimaS
6 - Meteoroid

Sure, here's how it's set up

SPetrie
13 - Pulsar

Do you have any downstream tools attached to the output of your batch file? If not, throw a browse on there. Batch files will only run one iteration if there are no other tools attached after them.

It seems to run fine when I run it.

SPetrie_0-1660238367430.pngSPetrie_1-1660238394055.pngSPetrie_2-1660238418107.png

 

CosimaS
6 - Meteoroid

That was the problem! I didn't know it worked that way. A very simple solution, thanks

Labels
Top Solution Authors