Start Free Trial

Alteryx Designer Desktop Discussions

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

Conditional Detour in a Batch Macro

Raphael_Des
5 - Atom

Hi,

I am designing a batch macro to aggregate several CSV files into one single Database.

However my inputs don't have a set number of columns, as some sub identifier can vary from 5 to 8 identifiers each stored in different columns.

I am trying to create a conditional detour to check if the columns 5, 6, 7, 8 are already in the input, and if not add a blank column.

For that I have extracted the Field information and compared it to a list containing the field name "Column5, Column 6, Column 7, Column 8", which then create a flag (0/1) for the detour.

 

However it seems that my drop down tool is not sending information to my condition tool.

Would anybody have some advice on how to handle this issue, rather by correcting something on my workflow or a new approach.

 

Many thanksAlteryx Help Screenshot.PNG

 

1 REPLY 1
jrgo
14 - Magnetar

Hi @Raphael_Des 

 

If the flag you're creating is inside the macro itself, that wont work because Interface tools execute before the workflow run.

 

And in case you were trying to make it work this way, Interface tools can't be used as normal tools, meaning, if you have the YXMC file open and hit the run button, all the interface tools are inactive.

 

If all you're trying to do is add columns that might be missing, you can use a Text Input tool and create an empty table with the columns that your expecting to see and UNION with your main data stream (CSV file), like this...

jrgo_1-1763592729235.png

 

Hope this helps!

 

-Jimmy

Labels
Top Solution Authors