Hi team,
I was looking to create a parameter which would take a string value from user and add that to the filename creation. (Dynamic way to do it )
Example :- I have Dev,Prod and Test regions and I am trying suffix a string to filename based on the region that I run the flow.
filename:- Cust_DEV_TimeStamp.txt or Cust_PRD_Timestamp.txt or Cust_TST_Timestamp.txt
Any help appreciated.
Solved! Go to Solution.
In the output tool there is an option to take the file/table name from a field.
You can use an Append Fields tool to add a single field value to all rows and then this option would let you append a suffix to the filename.
If you want it in the middle as you showed then you would need to use a formula tool to create the required filename
Thanks for your quick reponse .
But I want it to be added to the filename it does not come along with data from start . When I follow these approach I have to create 3 different fields and have three stings init like DEV,PRD and TST. at have to choose one everytime getting into flow.
jdunkerleys suggestion is good. How do you know whether you're in DEV, PRD or TST? Can this be identified in the data? How does Alteryx know in which it is running?
that is the reason, I would like see if alteryx accepts any dynamic parameter during the run time. when I pass the parameter that should get assigned to a field and as said I can use that field in output component.
There could be ways - for example if the directory you're saving the workflow contains the environment you could parse that value and add it to the file name.
You could also drive the workflow from a config file and pass in the variables from a config file - this is how I'm currently working to prevent making changes to the workflow as I move between environments, I just update the config file.
You could do this in an analytic app or have a user constant on the workflow
Can you help me with more information on config file changes if possible ?
Sure, create a simple text file containing the variables you want to load into the workflow. This text file should be an Input into the workflow. Depending on how you move between environments - personally I have a folder structure that's replicated in each enviroment, use the .. (relative references) for my config file Input, meaning when I copy a workflow between environments it automatically points to the config file within the 'new' environment - assuming the config file is in the same relative location in the different environments.
When moving between environments I copy the macros and workflows only. My config file is always a fixed Input Data tool with a relative reference - Options - Workflow Dependencies. Other inputs are Dynamic Inputs with the file path of the input taken from the config file.
Sorry, not so easy to explain in words. I also can't upload screenshots with the IT settings here (feel free to upvote this and put more pressure on the forum provider to make this happen http://community.alteryx.com/t5/Suggestions-For-Our-Community/Paste-images-directly-into-discussions...
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |