community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Community v19.6

Looks aren't everything... But the latest Community refresh looks darn good!

Learn More

Linking directory tool to the dynamic input tool

Atom

I need to perform a task DYNAMICALLY on a subset of files from a set of files. I tried using the directory tool and got the entire set of required files from a folder. Any insights on how to now choose a subset of files from the directory tool and use them with the dynamic input tool to perform a set of tasks dynamically (repetitively using different subsets of files each time)  ? 

Alteryx Partner

Hi,

 

If you cannot already filter it from the wildcard option (e.g. *.csv), then I would create a wildcard list in a text input tool, e.g.

 

WildcardName

 

Name1

Name2

Name3

 

I would then use a Find/Replace tool to do find from the directory list any files that match the list in your text input tool. Filter out the results that don't have any matches and you have the files you want. Does that work?

Bolide

Hi @NA 

 

There's a few ways to do this, and the best will depend on how many files you're bringing in and (more importantly) what those files look like. If all your files look the same (i.e. same field names and width etc.) then the Dynamic Input tool alone will do the trick. 

 

If you want to bring in multiple files that look (even slightly) different, then you'll want to put it in a macro, so that it can handle one file at a time. Both examples below and attached:

DynamicInput2.PNG

 

 

Thanks

Andy 

Highlighted
Alteryx Partner

Of course, a filter is a great & simple way as well! That should really be the first port of call before creating a separate text file as a "master" list. I would suggest Andy's approach if you have a simple list of files to filter, but if the list is quite long, I would start to look at creating a master reference file instead (as I originally suggested).

Labels