This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
First post here, and I may just be missing some entirely better way to do what I am doing. I am experienced in analytics, but newer with Alteryx.
Is there a way to take one input (in this case a Date or Drop Down) from an interface tool, then connect it to a large number (~80) of separate Input Data tools?
What I want to do is have a variable such as "EndDate" in each of the input SQL queries, then replace that with the user-provided date in every instance. Copying the action does work, but must be repeated many times and becomes incredibly cluttered.
On a related note, there doesn't seem to be a global find and replace, which would also help tremendously. Hopefully I am wrong. The search points me to tools containing the term, but won't make changes within them or make changing them easy (must open tool and search goes away).
That's a lot of Inputs! There is another way to do what you are saying without using Action tools. Almost every Interface tool creates a user constant. You can see them in the Workflow tab of the Workflow configuration.
What is awesome about these new constants is that you can reference them in Alteryx by typing %Question.Name% where "Name" is the Annotation name of the tool. You can see the Name in the Name column of the image above.In your case, if you put %Question.Name% in the SQL where you want the value from the Interface tool to go, the value will populate there when you run the app.
For example, in the below image I have a simple SELECT statement in my Input tool. I changed the Annotation name of my Text Input to be "TEST_Q" and then changed my SQL to read "SELECT %Question.TEST_Q% FROM...".
Now, whatever I enter in the Text Input when I run the app, that value will go into my SQL statement where the %Question.TEST_Q% is placed.
As far as a global find and replace, you could try opening the Alteryx workflow in Notepad and then finding and replacing things as necessary. Alteryx workflows are just XML code, so you can edit them in a text editor (I recommend Notepad++). However, if you edit the file incorrectly, Alteryx may no longer be able to edit it so be sure to save a copy.
Seems to be a slam dunk response to my needs, thanks! Implementing now and will update if snags. From the description it is exactly what I need. I was thinking such an option should exist, but did not know of it or what to call it.
I'm already using notepad++ as well, and expect not to ruin my file by using a lot of context from the SQL query since what I need to replace will always have the same text surrounding it. This *should* keep me from screwing things up.