Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Looping input files

TMEY_dec
5 - Atom

Hi everyone,

 

I'm modelling some transport data for work. We have 7 different options, each option with 3 project years meaning that we have at least 21 different input files to run and therefore 21 output files. I'm wondering whether there is a way for our workflow to automatically move to the next input data file after completion and create a new output file without me having to manually update the Input Data file (or have to duplicate the entire workflow). 

 

As it stands, we have three different 'Base Case' input files (i.e. one for each project year), 21 'Project Case' input files (i.e. 7 different options, each having three different project years), and then a 'Fixed Input' input file which will not change.

 

All of our file names are named consistently e.g. 'TransportModel_Y2026_Base Case' and 'TransportModel_Y2026_Option1' and are all held in the same file directory. The data within Input data file are all named consistently.

 

Would love  to hear some tips or solutions!


Thanks,

Dec

3 REPLIES 3
fmvizcaino
17 - Castor
17 - Castor

Hi @TMEY_dec ,

 

Attached is an example showing how to do that with excel files with multiple tabs. Since I don't know your file format, I'm sharing you this complete solution where I'm using the first dynamic input to get all sheets and then the next dynamic input tool to open files one by one. Then, my output data tool is configure to get the [FileName] column and create one file for each different [FileName] data.

If you don't need to open sheets with multiple tab names, you can skip the first formula tool and the first dynamic replace.

 

LEt me know if that makes sense to you.

Best,

Fernando Vizcaino

jogayon001
7 - Meteor

Hi @Tmey, 

 

Thanks for this. Helps me as well. 

TMEY_dec
5 - Atom

Hi Fernando,

 

Thanks for your response!

 

To clarify, my input CSV's only have one sheet each and the sheet names are titled 'Option1_2026', 'Option2_2026' etc. through to the seventh option 'Option7_2026', so I don't think I'll need the first part of your Solution workflow, but thank you anyway 🙂 

 

I've attached my workflow to help with the below:

 

I'm having trouble in several areas still. Firstly, the dynamic input tool continuously creates an error because the file is not found. I've troubleshooted this and apparently the file path name can't be longer than 260 characters? Is there any work around for this if so (other than moving the file to somewhere else)?

 

 I'm also having a bit of trouble creating the Output tool so that my workflows produce 7 different outputs in CSV form. 

 

Thanks again for any help!

Labels