Text box to Input data to SQL
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi!
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!
Solved! Go to Solution.
- Labels:
- Input
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Thanks
Michal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Brava @LindaT! It works now :))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
