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

How to change the selected value of a drop down list via expression

I'm looking for a way to change the selected value of a drop down list through the OnSelect of a button. I would imagine this expression for the OnSelect would have worked: dropDownList1.Selected.Value = "01"

...but it doesn't. I get no error or warning message. It just doesn't seem to do anything.

The drop down list has the following values: "12","01","02","03","04","05","06","07","08","09","10","11"

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: How to change the selected value of a drop down list via expression

If an explicit selection has not been made you can do this with an OnSelect by using the OnSelect to set a variable value and then setting the default value of the dropdown to the variable value.  If an explicit select has been made then you do the same thing, but you also have to do a reset of the dropdown control to get it to pick up the default.  PowerApps is declarative, not procedural, so you can't change the value of a control property directly in a behavioral action.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
Highlighted
Dual Super User
Dual Super User

Re: How to change the selected value of a drop down list via expression

If an explicit selection has not been made you can do this with an OnSelect by using the OnSelect to set a variable value and then setting the default value of the dropdown to the variable value.  If an explicit select has been made then you do the same thing, but you also have to do a reset of the dropdown control to get it to pick up the default.  PowerApps is declarative, not procedural, so you can't change the value of a control property directly in a behavioral action.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,977)