Populate drop down with values from connected tool
- 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 build an App, where the user is prompted to choose the value of [Index] (e.g 5) that updates the value in the Select Records tool
I have got it to work using a Numeric Up Down tool where I manually set the conditions of [Index]...see attached workflow
However, I would prefer the user selected from a drop down, which is populated with the values of [Index] from the same Input.This way if Index '11' suddenly appears in the source data, I don't have to update the Maximum in the Numeric Up Down tool.
I have looked at the example for the Drop Down tool and it seems the 'Fields from Connected Tools' option is for the User to select the 'Field Name' rather than the 'Field Value'. I have got around this by including a Cross Tab tool (see second workflow) but wondering if anyone has any better ideas?
Solved! Go to Solution.
- Labels:
- Apps
- Interface Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks @patrick_digan, yes I agree!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
One of the options in the Drop Down tool is to connect to an External Data Source. You can use this to connect directly to a database or file to populate the drop down.
I'm going to make an assumption that your data is in a SQL database, although this should apply for other technologies.
You would connect to your SQL Database using the External Data Source option, and then write SQL something like the following:
SELECT [INDEX] [NAME], [INDEX] [VALUE] FROM TABLE GROUP BY [INDEX]
This will pull a list of all existing indexes from your table.
The reason we call out the [INDEX] column twice in our SELECT and rename it to NAME and VALUE is because the Alteryx Drop Down tool expects a NAME (the value the user sees) and a VALUE (the value that is passed into the app).
If you had a name column in your database that the user was more familiar with than your index numbers, you could replace the first INDEX in the SELECT statement with a different column, and it would display that front end value.
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Not sure how to cancel this post - but I got it! it's all good now!
-----------
Hi I think I have a similar question, so I have below table and I want to put "Name" column for user to select in Drop Down menu, and then update the input value with corresponding "Value"
e.g. if user select "Apple", my data field user_input = 1
I managed to use Cross Tab to make the Drop Down menu show list of Apple, Banana, Orange. But I am not able to update the value 1 - it is updated as "Apple". Please could you share a sample workflow if you have done something similar. Thanks!
Name | Value |
Apple | 1 |
Banana | 2 |
Orange | 3 |
