Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Assist with Dynamic Input

itssumanb
8 - Asteroid

Hi all  - I am fairly new to Alteryx but need to get up and running soon. Therefore, I am hoping someone can help me with the Dynamic Input functionality and options to output. 

I have attached a pic of my workflow. My current workflow allows the user to input only one file. Firstly, I would need to let the user(s) input multiple files (from different folders within their computer). All of the files will use the same workflow/logic in the container (attached). Second, the output file (excel) is expected to populate the results in a separate sheet/tab for each input file.  Finally, (optional) if the sheets can be named as the input file name that would be a bonus for me :). Please let me know if I am unclear. I appreciate your time and consideration.

Thank you 

5 REPLIES 5
echuong1
Alteryx Alumni (Retired)

Is the number of files/sheets that are going to be run through always the same?

 

There are ways to make this dynamic, but it might be easier to just have multiple workflows on the same canvas - one for each file/sheet. Basically, you would just copy and paste the workflow once for each file. To dynamically use the file name in the sheet that is output, you can use option #5 in the input to read in the file path/name, and then you would use it in the output tool to change the sheet name.

 

echuong1_0-1602625562318.png

echuong1_1-1602625637119.png

 

 

Hope this helps you get started!

 

AbhilashR
15 - Aurora
15 - Aurora

Hi @itssumanb, included in the attached zip file are components of the solution I use to read multiple excel files from a given folder. 

AbhilashR_0-1602632726284.png

Open and run the test.yxmd file which in-turn references the two macros in the workflow. 

itssumanb
8 - Asteroid

Hello - thank you so much and sure this will help me get started. To answer your question - The # of files won't be the same always but I know they will be about 5, 6, or 7 files to run at a time. 

atcodedog05
22 - Nova
22 - Nova

Hi @itssumanb 

 

I can see @AbhilashR is using Directory tool to read files.

 

Directory tool will get all the filenames in the selected folder irrespective of number.

 

Hence it should work.

 

https://help.alteryx.com/current/designer/directory-tool

 

Hope this helps 🙂

 

 

AbhilashR
15 - Aurora
15 - Aurora

Hi @itssumanb, as @atcodedog05  mentioned, the Directory tool brings back metadata of all files within a folder which gives you the flexibility in terms of the number of files you read in. 

Labels