cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tduncan1
Level: Powered On

Dropdown List

Create a Dropdownlist which has a value of the code and the desciptions is displayed (e.g. A - Active and I - Inactive).

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft Employee

Re: Dropdown List

I think you would like to replace the explicitly defined text values with values referenced from another ComboBox control? If so then you can have:

ComboBox1.Items=Table({Value:"A", Description:ComboBox2.Selected.Value}, {Value:"I", Description:ComboBox3.Selected.Value}))

 

or:

 

ComboBox1.Items=Table({Value:"A", Description:First(ComboBox2.SelectedItems).Value}, {Value:"I", Description:Last(ComboBox2.SelectedItems).Value}))

 

The first formula references values from 2 other ComboBox controls (2 and 3) and the second formula references 2 different values (first selected and last selected) from a single control (2)

14 REPLIES 14
Microsoft Employee

Re: Dropdown List

You can use ComboBox control as a dropdown list. If all you need is to populate the values manually, then you can do:

ComboBox1.Items=Table({Value:"A", Description:"Active"}, {Value:"I", Description:"Inactive"})

Your ComboBox control will display "Active" and "Inactive". But if you add a Label and set Label1.Text=ComboBox1.Selected.Value

Then you Label will display "A" or "I" depending what is selected in your ComboBox control.

tduncan1
Level: Powered On

Re: Dropdown List

Thank you.

 

Is there a way to do this a case statement to make it a little bit eaiser?

Microsoft Employee

Re: Dropdown List

I don't think case statements are supported. You can use multiple lines in your formula though. This will improve formula readability.

tduncan1
Level: Powered On

Re: Dropdown List

How would you define the text field as a combobox?

Microsoft Employee

Re: Dropdown List

I don't understand your question. Can you please provide a short example?

tduncan1
Level: Powered On

Re: Dropdown List

you mentioned that the follwoing can be done through a combox (i.e. ComboBox1.Items=Table({Value:"A", Description:"Active"}, {Value:"I", Description:"Inactive"})) prior to defining the table items, how would you change the text field to a combox?

I hope that makes some sense.

Microsoft Employee

Re: Dropdown List

I think you would like to replace the explicitly defined text values with values referenced from another ComboBox control? If so then you can have:

ComboBox1.Items=Table({Value:"A", Description:ComboBox2.Selected.Value}, {Value:"I", Description:ComboBox3.Selected.Value}))

 

or:

 

ComboBox1.Items=Table({Value:"A", Description:First(ComboBox2.SelectedItems).Value}, {Value:"I", Description:Last(ComboBox2.SelectedItems).Value}))

 

The first formula references values from 2 other ComboBox controls (2 and 3) and the second formula references 2 different values (first selected and last selected) from a single control (2)

tduncan1
Level: Powered On

Re: Dropdown List

Thank you

tduncan1
Level: Powered On

Re: Dropdown List

One more question.

 

How would you do the same thing but inside of a gallery, without a combox but with text?

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 175 members 4,655 guests
Please welcome our newest community members: