Hello,
I would like to know if there is a way to assign constants in Alteryx that change each time I run it. I require the variables to change based on the data inputs. For example, each month I add an additional month of data to the dataset and I want the workflow to make the whole period as a constant. I require it to help with the Dynamic filters.
I know I can solve the issue by using the Interface tools, but I do not know if the dynamic assignment of workflow constants is an option in Alteryx.
Solved! Go to Solution.
Hello @sarunas_stulga
You can do this by clicking on the canvas, then on the configuration window click on Workflow and on the '+'.
You will be able to type the name and the value for the constant
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regards
Would it be possible to define the value as the output of a specific tool on the canvas?
Hello @sarunas_stulga ,
As far as I know you cannot change the value of a constant whithin a workflow.
If you need the value in the same canvas on a different tool then I would recommend you using another system, for example, using append tool to only get the selected value into the table you are performing your calculations.
If you would want an example of that I could create one.
Regards
Also,
Is there a way to change a user constant at runtime, but in Alteryx Server? Since it's an user constant, I would expect a context menu that would allow me to change that user constant on runtime, like it happens already on other Integration tools. Is this possible? This would be a great way to reuse the same workflow, for different values of the same constant.
E.g.: I want to onboard a table, perform the same changes, and output it. The table_name changes, but thw workflow is the same. If I want to have specific workflows to load 10 tables, I would have 10 workflows with different values for that constant. Or is it even a better way to do this and still "separate" each independent execution of the workflow?
Hello @amti ,
if you are going to change it on each workflow why not have a numeric interface tool? Wouldn't that be the best solution in this case?
Regards
Hi,
Actually that's what I did: I passed from having user constant to input text box or any other interface, the problem with having interface is that I cannot schedule it in Alteryx Server and change the parameters/question for each run ...if it's only for adhoc execution, when you hit "Run" it asks you for parameters/"Questions", if you click on "Schedule" those parameters are not possible to edit ...yet (this is a feature that has been requested for 2 years, at least, from what I can read here in the Community 😶 ).
I am looking for exactly the same implementation. I have dynamic "workflow constants" that I want to set, so that they are easily available in the rest of the workflows.
I dont want to access the parameters through user dialog for exactly the same reason as you, which is, they interfere with running the workflow unattended.
I do feel that it should be a lot easier to be able to add/edit the constants at run time. I am not sure how this could be directed as a feature request...
I have worked with another solution that loads in parameters based upon an input file, this continues to be cumbersome as the parameters are used in various places in the workflow. In the end I ended up using "wireless connections" to prevent connection lines all over the place.