web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Change value of drop d...
Power Apps
Answered

Change value of drop down by clicking a button

(0) ShareShare
ReportReport
Posted on by 302

Scenario:

I have a button that only displays if a list item has a status of Not Accepted.

I would like the OnSelect of the button to change the value of my drop down ddCompleted to "Not Accepted" 

is this possible?

Categories:
I have the same question (0)
  • Verified answer
    BCBuizer Profile Picture
    22,707 Super User 2026 Season 1 on at

    Hi  @honganhuynh1

     

    You can do so by using a variable.

     

    Set the OnSelect property of the button to:

    Set(varDropDownDefault, "Not Accepted")
    

     

    Set the Default property of the Drop Down to:

    varDropDownDefault
    

     

    Set the OnChange property of the Drop Down to:

    Set(varDropDownDefault,Self.Selected.Value)

     

    You may have to change "Value" in the formula at step 3 to something else, depending on the column name that is showing in the Drop Down. You can find the right name in the Properties pane when selecting the Drop Down: 

    BCBuizer_1-1677861258124.png

     

  • SebS Profile Picture
    4,816 Super User 2026 Season 1 on at

    @honganhuynh1 

     

    I'm assuming ddCompleted have only two choices Completed and Not Accepted

     

    You can take this approach :

     

    In OnVisible of screen property add code

     

    UpdateContext({varDropdown:false});

     

    than in Dropdown Default property add

     

    If(varDropdown,"Not Accepted","Completed")

     

    In the Button OnSelect add :

     

    UpdateContext({varDropdown:true})

     

    That should give You the result You looking for

  • mmollet Profile Picture
    3,187 on at

    Could you try to explain what you are trying to do a little more or share some images? I know you are working with a button and a dropdown but not sure exactly what your goal is. 

     

    If your trying to change the status of the selected item in the dropdown list with a button click then yes that would be possible. When you select an item from a dropdown in Power Apps it is not only selecting that value but rather is a reference to that entire object/row in the list. So for example if you chose "John Doe" from a drop down list, you are not only selecting that string you are selecting the object that string belongs to which could include age, sex, height, weight, department, salary, etc. You can use that knowledge to edit using a button and the currently selected item in the dropdown menu. For example if you set the OnSelect of a button to:

     

    Patch(YourSPList, ID = dropdown1.selected.ID, {age: 38, salary: 1,000,000, department: "admin"})

     

    what would happen is Power Apps would look for the item in the SP list with the ID that matched the ID of the item chosen by dropdown1 and then would change whatever column value you passed in. (given that the value is a valid input based on SP column settings etc.)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 899

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 499

Last 30 days Overall leaderboard