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?
Solved! Go to Solution.
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
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
I had the same instinct here as @Jonathan-Sherman - so do look into that too.
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.
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