Alteryx Designer Desktop Discussions

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

Using a dynamic filename for a Input Data Tool

RoelEsselink
8 - Asteroid

 Hello all,

 

I have scoured these forums but I cannot find an answer to how I can get generate a dynamic file name that then can be used in a Input Data tool.

See attached workflow. This is how I generate the filename. How can I then use this as an input for a Input Data tool? This is just for one file that needs to be used in the follow-up workflow.

 

Hope anyone can help as it feels it should be possible but I am not seeing the light.

5 REPLIES 5
andrewdatakim
12 - Quasar
12 - Quasar

Have you tried using the Dynamic Input Tool? Are you trying to open this file in the same workflow or a separate one?

RodL
Alteryx Alumni (Retired)

You would use a Dynamic Input tool in this case.

You can set any of the old files as the template in the tool, and then (based on what I see in your workflow), you would set the action to "Change Entire File Path".

beelerrc
7 - Meteor

If the directory has other files, you can use something like this in the input tool: \\nlamvfs00074.europe.shell.com\spotfirewonacifs\NZW\Output\Forecast Archive\MeteoForecast_*.2016.csv or you can use the directory tool, a filter, then the dynamic tool as others have suggested. Depending, on your level of detail you need, a simple macro could work as well.


RoelEsselink
8 - Asteroid

Thanks for replying!

 

I am not getting how to use the dynamic input tool I think. In the workflow I attached I have a formula tool that outputs the whole file path. How do I then use this value in a dynamic input tool? 

 

Could you humour me and create a workflow that does that in a way that I can use that value to import that file via an Input Data tool into a workflow (either the same or a different one, whatever is easier).

beelerrc
7 - Meteor

The attached workflow will be roughly equivalent to using the regular input tool and using a * for the filename, but gives you an idea of one way to use it.

 

My understanding is your process is something like:

1. workflow A processes data, and at the end generates one file in a directory.
2. Workflow B needs to find the file generated from workflow A then continue processing.

The example I provided won't work if you have multiple filnames in the same directory unless you're generating the filename in Workflow B.

Another thought though, if you only generate the file once a day, and it's basically the same file just altered by date, you could use either input tool to sort of "find" the right file. One example would be to throw the directory tool in workflow B, use the filter tool to find the most recently created file, then use basically the same parameters for the dynamic input tool I attached. Does that get closer to what you're looking for?

Labels