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

Dynamic Input tool - Must specify file name

RasmusTS
6 - Meteoroid

Hi everyone

 

I've adapted edited a dynamic input tool, which will import an excel file from a specified folder, while dynamically changing the path to match the Username of the one running the workflow. 

 

However, I would like to be able to input any excel file in the specified folder, rather than only the one specific file. 

In the normal input tool i would be able to change the file path to say "/*.xlsx", but I find that this doesn't work with the dynamic input tool. 

 

Is there an "easy" way to fix this?

 

Thank you in advance. 

5 REPLIES 5
Felipe_Ribeir0
16 - Nebula

Hi @RasmusTS 

 

Use the directory tool to see all xlsx files inside the folder. After that, use the same formula to concatenate the sheet names with the fullpaths of the xlsx files and pass it to the dynamic input tool.

 

Felipe_Ribeir0_0-1668165437846.png

 

If the provided answer helped you to solve the problem/was correct, please accept it as a solution :)

 

Thanks.

 

DataNath
17 - Castor

@RasmusTS what error are you receiving when trying this? Wildcard inputs should still work with the Dynamic input tool:

 

DataNath_0-1668165671138.png

DataNath_1-1668165679167.png

 

However, this will only work if you have Excel files that follow the same schema i.e. the names, order, data type etc of every field.

 

If you have files with varying schemas then you'll need to go down the route of a batch macro - there's a great article here outlining all the possible routes of inputting multiple files: https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/The-Ultimate-Input-Data-Flowchart/t...

Felipe_Ribeir0
16 - Nebula

The solution with the directory tool will not work like i shared because of the variable filepath (based on the user). Saw it now.

 

The way that @DataNath shared works for your case!

RasmusTS
6 - Meteoroid

Thank you again! 

 

I'm not sure why it wasn't working for me before.

But like you said, it is working with the wildcard input. 

 

I believe the error may have been on my part by having the excel sheet open on my PC while running the workflow. 

 

Thank you so much for all your help!

DataNath
17 - Castor

Ah yes, you can't work with a file in Alteryx whilst you have it open - unless you cache your workflow beyond the point where it's brought in! :)

Labels