Alteryx Designer Desktop Discussions

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

Batch Macro with different Operations on each sheet simultaneously

Charlie0958
6 - Meteoroid

Hi There,

 

I am having trouble trying to figure out how to update the file path while specifying the sheet for each input file tool within a batch macro. 

 

I have a field that stores all the file names I would like to process outside of the macro. That file name field feeds into the macro and is the control parameter for the macro. I then have an action that updates the file path of an input tool. I currently have it configured that it will replace a specific string and I delete the sheet name part (|||`sheetname$`) so that it replaces everything but the sheet name. 

 

That seems to work most of the time however sometimes it doesn't work and only the first filename that is populated gets run for every iteration of the macro. I can't figure out the reason as to why it won't work sometimes and I'm thinking there has to be a better way. 

 

In summary... each file has 4 sheets that need to be read in to seperate input tools where different operations and joins are performed on each. I need the action to replace the file name each time while maintaining the sheet name for each input tool. 

 

Thanks in advance for the help!

2 REPLIES 2
markcurry
12 - Quasar

Hi @Charlie0958 , usually if it's the first file that gets populated with every run for every iteration of the macro, it is because of the configuration in the Action Tool.  Make sure that file string your are replacing matches the File value....

 

Action Tool.PNG

Charlie0958
6 - Meteoroid

Thanks for your response Mark. The issue was that each of the files was in a different folder. I think replacing everything before the sheet wasn't too reliable so I changed it to only update the specific part of the file path that changed. It seems to be working as expected now. Thanks for the help!

Labels