Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Set output file names using variables

R389921
6 - Meteoroid

Hello,
I'm looking for a simple way to use variable(s) in the name of output files of a workflow.
Thanks

2 REPLIES 2
DataNath
17 - Castor
17 - Castor

@R389921 the approach for this is constructing your filepath and plugging these variables in, within a formula. In this example, let's say I have regions in one field, and I want an Excel output for each, named appropriately. I'd build up my filepath around that, inserting the [Region] field like so:

 

DataNath_0-1660897822302.png

 

In the Output Data tool, I can then select anything in 'Write to File or Database' - it doesn't matter at all, as it's going to be getting replaced. At the bottom of this configuration, I then select 'Take File/Table Name From Field' > Change Entire Filepath > Pick the newly created filepath field that we just made in the formula tool:

 

DataNath_1-1660897907106.png

 

When I run, it'll then created a grouped output for each different variable within that field:

 

DataNath_2-1660897935071.png

 

If you'd like to automate this, I recently built and uploaded a macro to the community gallery that does this all for you - all you have to do is download it and insert it into the workflow before configuring it as you wish (it's pretty intuitive but give me a shout if further help is needed): https://community.alteryx.com/t5/Public-Community-Gallery/Output-to-multiple-Excel-files-or-sheets/t...

jalbiblo88
6 - Meteoroid

The naming of the output file is a Windows script syntax issue and the solution will depends on your chosen shell, not FFmpeg. I'm not on Windows. Have a read of examples for your particular shell / script language. I was just trying to be kind to identify the FFmpeg bits that were clear syntax errors where the FFmpeg command would absolutely fail. Your script would have the same file naming challenge if you were using "echo" as "FFmpeg", so it really isn't really an FFmpeg question. Hopefully, someone with Windows experience can help.

 

 

192.168.100.1  192.168.1.1 

Labels
Top Solution Authors