Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Populate drop down with values from connected tool

mb1824
9 - Comet

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?

 

 

 

5 REPLIES 5
patrick_digan
17 - Castor
17 - Castor

@mb1824 I've submitted my solution to the problem here. I think another option like "Data from connected tool" would solve your issue.

mb1824
9 - Comet

Thanks @patrick_digan, yes I agree!

Claje
14 - Magnetar

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!

mb1824
9 - Comet

@Claje

 

Thank you so much, yes my source data is SQL and that has worked nicely!

Anna_Tse
5 - Atom

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! 

 

NameValue
Apple1
Banana2
Orange3

 

Labels