cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

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 II
Dual Super User II

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 II
Dual Super User II

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
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,859)