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

Looping a Workflow with Different Input Files

tjtrom
5 - Atom

I am attempting to loop a simple macro for multiple inputs with the same format and have each of these inputs produce a separate output. I can get a list of the files I want the macro to run through with the Directory tool, but I cannot figure out how to ensure that the macro takes each file separately. Can anyone provide insight on this?

5 REPLIES 5
TomWelgemoed
12 - Quasar

Hi @tjtrom ,

 

Maybe something I posted a few days ago will help: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Marco-that-Import-specific-sheet-from-...

 

The only difference is with how you need to treat the output - if you need multiple different outputs, you may need to use something like a filter tool inside the macro to send specific types of outputs into different macro output tools.

 

Hope that makes sense.

 

Regards,
Tom

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @tjtrom,

 

It may be worth investigating whether you can use the dynamic input tool as your input inside a batch macro. This way you could feed in the file paths as your control parameter and have this read into the input location of the dynamic input tool. Since all files you're reading in have the same schema there should be no issues there either.

 

If this solves your issue please mark the answer as correct, if not let me know!


Regards,

Jonathan

TomWelgemoed
12 - Quasar

I had the same instinct here as @Jonathan-Sherman - so do look into that too.

tjtrom
5 - Atom

Johnathan,


I solved it with something similar to what you suggested. I put the dynamic input tool before the batch macro and it ran each file individually through the macro.

rvansyckle
5 - Atom

Hi, would you be able to provide the macro? I am working on something where I need my workflow to loop and have a different input each time. I'm thinking this might be something similar

Labels
Top Solution Authors