Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to get user selected file IDs from a folder containing multiple files in Alteryx.

AbhirupMukherjee09
7 - Meteor

I am looking for a solution where the user can select a file ID from a drop-down or text box which will trigger only those files from the folder to be selected.

 

For Ex - If I have 4 files in a folder (same naming convention) - 100_ABC.csv, 100_XYZ.csv,100_PQR.csv and 200_DEF.csv.

Now I want the user to input the file ID say he enters 100 using the Interface tool and then only the 3 files from the folder should be fetched and 200_DEF.csv should be ignored.

 

I have extracted the full path for the files which will be then fed into a batch macro, but I want only the user selected files .

Any suggestions ? 

1 REPLY 1
DataNath
17 - Castor
17 - Castor

@AbhirupMukherjee09 I'd build it out using something like this, where the Interface tool affects a filter isolating only the files of interest. As you can see here, we filter based on what the filename contains:

 

DataNath_0-1666080248964.png

 

For the action tool, we tell Alteryx to update the '100' part of the workflow so that, if in future, an end user wants to import other files, this will be updated with their selection.

 

DataNath_1-1666080350551.png

 

For example, here I've entered '200' and you can see it only brings back the relevant file:

 

DataNath_2-1666080406393.png

 

Have attached the app for your reference - you'll obviously need to change the directory etc to match your own requirement, and the result of the filter will of course feed into your control parameter whereas I just have it ending at a select+browse to demonstrate the concept.

Labels
Top Solution Authors