Start Free Trial

Alteryx Designer Desktop Discussions

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

Run the same workflow on number of fields (columns)

kwieto
8 - Asteroid

Asking for little help again:

I have a simple workflow: split comma separated string to rows, sort the output in alphabetical order, then combine the output together into one row to have the values in string sorted.

The workflow itself is easy to craft, the thing is that I need to run it through multiple fields (columns) in the table.
I can multiply the same workflow for each field and just change the source column for each flow, but maybe there is better solution?

I thought about some kind of batch macro, but it seems that such macros are for processing group of records within same field (column)?

5 REPLIES 5
kwieto
8 - Asteroid

Any chance for help?
Or it is just not possible to do that?

Raj
16 - Nebula

yes that's possible, hope this will help

  1. Open Alteryx and create a new workflow.

  2. Drag and drop a "Input Data" tool onto the canvas and connect it to your table.

  3. Next, drag and drop a "Dynamic Input" tool onto the canvas and connect it to the "Input Data" tool.

  4. In the "Dynamic Input" tool, select the columns you want to process. This will create a loop that will iterate over each column and apply your workflow to each one.

  5. Drag and drop a "Batch Macro" tool onto the canvas and connect it to the "Dynamic Input" tool.

  6. Configure the "Batch Macro" tool to take a single field (column) as input, apply your workflow to that field, and output the result.

  7. Connect the output of the "Batch Macro" tool to a "Union" tool.

  8. Configure the "Union" tool to combine the output of all the individual workflows into a single table.

  9. Finally, connect the output of the "Union" tool to a "Output Data" tool and configure it to save the result to a file.

That's it! This workflow will apply your workflow to multiple columns in your table and combine the results into a single output.

davidskaife
14 - Magnetar

Hi @kwieto 

 

A Batch Macro will work, but i think you can do it simplier than that. Note there is no such thing as a Batch Macro tool out of the box, you need to build it...

 

If i understand your requirements try this:

 

DavidSkaife_0-1682077105251.png

 

I think i've got it, but, if not, please post input and expected output (even just a sample)

kwieto
8 - Asteroid

Simplier than I thought, thanks, this is exactly what I needed.

I'll look for macro solution as well, as I have similar workflow but with checking against some reference table (so after a split, the data should be checked against the reference and not matching values listed as an output)

kwieto
8 - Asteroid

@Raj , can you elaborate a bit more on the creation process?
I'm not sure I have same version of Alteryx designer, I don't have "Batch Macro" tool for example, I can convert the workflow to the macto and then specify it as a batch type.
I don't know how to configure the dynamic input tool, either. It requires me a kind of a "Input data source template"?

Labels
Top Solution Authors