Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Use connection string in a expression


Is there a way to check or store the connection string in a variable within a workflow to make it possible to include it in an IF/ELSE statement?


My workflow needs to check whether I'm in the DEV/UAT/PROD Database and return an expression based on it. 


Hi @rbarron ,


The way you can achieve this is by using the user-defined constants in the Workflow Configuration window. You can create a constant which would be all (or part) of your connection string. This can then be called and used in formula tools or connections in the workflow. The benefit of this is that you can then edit the connection string in one place and this will propagate throughout the workflow.


The Configuration Window can be foun by clicking on the canvas white space and then on the Workflow tab on the left.


Hope this helps.




Thanks @LukeM!


Its now working.