Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Dynamic directory for export path


How do I dynamically change the file path for exporting data?  The export tool only has a single input and I can't figure out how to combine a dynamic input/text field so that I can change to where I'm writing data.


The file name itself will always be the same but my output directory will change from month to month.  It seems like this should be possible.


You can add a formula tool before your output data tool and define your output filepath and filename and also include a datestamp.


datestamp output filename.png


You then configure your Output data tool to take the filename and path from a field. If you don't want this field to show up in your output data, be sure to untick Keep field in Output


datestamp output filename 2.png


So there's no way to combine a text input field with the formula tool while preserving my data?


Following the below works but it means I have to update two places in my workflow each month.  Right now I have a single text input tool that is driving the dynamic pathing for 90% of my inputs.  I was hoping to use that text input as the driver for my output as well, since my output file is going in the same location as my monthly input files.


Sure you can. If there is a field with the file name and path defined in your text input tool (or anywhere else in your dataset) you can use that as the field to tell the Output data tool what to use for writing the file.


You can use the formula tool to update that field and insert a datestamp for instance. I suggest you play around with the different options in the Output Data tool. You can take just the filename from a field, add a prefix or a suffix to the existing field name, or take the entire path from a field.




I don't think I'm following.  Below is my final set of steps:


2-13-2019 11-13-14 AM.png


If I put a formula tool after that final step, then I need to connect the output of my filter to that formula tool, which means I can't connect my text input.

If I connect my text input to the output, then I don't get any data.


What tool allows me to connect my text input to my final data output?  I can't use a join because there are no matching fields.  I can't use a union because then that just stacks my data on top of each other.


What am I missing?


Append fields Tool to the rescue!


append fields.png


Sorry for the delayed response.  Thank you, that nicely seems to resolve my issue.


Though I gotta say that this was not an intuitive path at all.

="S:\FA Network Admin\Metrics & Reporting\20XX Gold Copy\"&TEXT(EDATE(NOW(),-1),"yyyy")&" Gold Copy\"&TEXT(EDATE(NOW(),-1),"mm")&"\Gross Worth Report (Shares) - "&TEXT(EDATE(NOW(),-1),"mmmm yyyy")&".xlsx"



I want this format