Is it possible to update a user constant from interface tools? Some of my apps can become a bit scattered simply because one interface question needs to be connected to 5+ tools in a module. This means adding 5+ action tools and a lot of connections. As an alternative, it would be great if there was a way to simply update a user constant with the interface tools. Then I wouldn't need all the action tools and i could just have the user constant in the various tools that need updating.
Solved! Go to Solution.
I think Alteryx Constants are Static not Dynamic.
Why don't you use a formula tool and update your Question from App Interface and use your Updated value in Formula to other tools in the workflow?
Patrick,
There are a couple of options available for you here:
1. If you want to use the answer to an interface question in a formual expression soemwhere simply connect the interface question directly to the Q input on the tool:
Then the answer appears in the formula builder and can be used directly:
You can then make the connections to the Q wireless and the clutter is gone :)
2. There is also a more hidden and less supported method of referencing questions directly without connecting the interface tool up at all.
So
And
With this method you surround the interface name with % like so %Question.<<Interface tool name>>%. One thing to note with this method is the answer to the question is directly substituted in place before the formula is parsed for correctness. So you will notice this time the question is inside the double quotes of my formula.
Hope one of those methods helps you.
Thanks for the replies! Adam, both of those methods are exactly what I was looking for! For what it's worth, I wanted to pass along that your second method of referencing the question without connecting it did not work in debug mode when I tried it (although it worked when I ran the wizard normally).
if you wanted to test it using run you can fill in a value for the question in the workflow constant area, note that each question on the canvas is a constant you can set on the workflow tab.
You may also want to change the name of the question as it appears on the workflow tab and you do this by changing the name on the tool annotations pane. The default name shown is Text Box (4).
AdamR, would the second, less documented method, be usable for population of the Pre-Create SQL Statement in Output Data tool? I have a Text Box that asks for a ME Date, named MEDate, then in the Pre-Create part I need it to execute:
DELETE FROM SCHEMA.TABLE WHERE MONTH = %Question.MEDate%;
However it is giving me a syntax error at month position...