Alteryx Designer Desktop Discussions

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

Batch Macro and Interface Tools

tlee2
5 - Atom

I have a fully functional workflow built out that utilizes interface tools (Drop Down and Text Box) to allow the user to select the month, year, and location. My goal is to update the workflow to give the user an option to run the workflow for more than one location at a time, with a separate output for each location.  I understand the Drop down should be replaced with a list box.  I am new to macros and am sure I am missing something.

 

Current Workflow:

1) Take a previous month's file and save it as the current file.  (Blob Input-> Formula->Blob Output)

The file path for both the blob input and output follows something similar to this:

C:\\Data\%Question.Year%\%Question.Month%\%Question.Location%\File.xlsx

 

2) Take the previous month's revenue data and update the current file (file from Blob Output) with this data (Input->Formula-> Output (file from Blob Output

 

Challenge: I have not been able to make this work to run the same workflow for multiple locations at once.  I tried using the directory tool and  dynamic input tools which worked to a certain extent, however, this does not seem to be the most efficient way of building the workflow.

3 REPLIES 3
apathetichell
19 - Altair

Hey - so it sounds like you're pretty close. The output of a listbox should be a list --- think of it like an array. You can set it up in whatever format you want via the list mode (under the select mode)... in your case -I'd recommend - just command delimited (assuming you don't have commas in your value)... Have your action tool from your listbox update a text input tool. keep it blank. And have that split via text to columns to rows... Here's the deal - this should set you up for how you'd normally process each row - and now you have to make a choice - append the rows from the text to column and continue as you would with a single value from your drop down --- or turn the current worfklow into a macro -> and feed the results of the text to column tool into it with each value being a different run. The primary difference here is that the macro may be cleaner and may handle memory better if your files are large. The generate rows/append will be faster for small/medium amounts of data.

 

Now -> you may have another problem - different schemas - and dynamic input. Let me be clear - I hate dynamic input. I do not use it. I have built one workflow in the last 4 years that uses it - and that's because it was a) large and b) I inherited the tool and didn't have time to sub it out. use a batch macro instead.

apathetichell
19 - Altair

We good here?

tlee2
5 - Atom

Thank you for your response!  I am moving away from the dynamic input approach and trying your suggestions along with the batch macro.

Labels
Top Solution Authors