Alteryx Designer Discussions

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

Text box to Input data to SQL

8 - Asteroid



I am trying to feed an user ID in the Input Tool via a text box. 


The input tool is supposed to run a simple SQL query:  Select * From CC_USAGE Where end_user_Id = 'xxx'


xxx should be replaced with the Used ID entered in the text box, in a format like 123456


When I run the app, I can see that xxx is replaced but still I do not have any outcome result. 








Thanks a lot!


Hi @Luca


You're doing everything right. The only thing that I can think of is the actual SQL - have you tested this outside of Alteryx? Could it be that the user ID is a number rather than a string? In which case you'll need to get rid of the single quotes.




8 - Asteroid

@MichalM unfortunately, I have already tried that and it doesn't work. So I'd say that the ID is a string.


Besides, if I populate the SQL query in the Input tool with an ID, it works fine. But as soon as I try to use the text tab  I get that error. 





Why don't you try the following 


1.Use the Text input tool to bring the user ID into your workflow - the text box will be updating this cell



















2. Use the value to update your where statement using dynamic input





Given your limited workflow, you would also need to make a change to the Interface Designer properties to include the "browse tool" in your output.  When an App is running all browses are disabled unless you explicitly call the out for viewing.  


8 - Asteroid

Brava @LindaT! It works now :))

5 - Atom


i realize this is an old post. hoping my question will be seen 🙂

Can you share the solution that worked for you?

I have a similar use-case. I need to be able to pass a user-input value into the where clause of the SQL query.

so far, I have not been able to get it to work.

8 - Asteroid

In my case worked ticking the Browse box as indicated in LindaT's screenshot above.


I thought that my workflow wasn't producing any result while the issue was that I could not visualize them.