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 / Preserve Dropdown choi...
Power Apps
Answered

Preserve Dropdown choice after Patch

(0) ShareShare
ReportReport
Posted on by 154

I've simplified this down to two controls and one SharePoint source.

 

There's a Dropdown that picks a record from a SharePoint list and displays Title.

There's a TextInput control that defaults to Dropdown.Selected.Status

The OnChange property of the TextInput control is 

         Patch('SharePoint List', Dropdown.Selected, {Status:Self.Text})

 

Here's the problem:

When I select some item from the Dropdown, and then modify the Status, the item is correctly updated BUT THE DROPDOWN SELECTION RETURNS TO THE DEFAULT FIRST RECORD.  This is because the list is updated, the dropdown is dependent on the list, so the dropdown resets.

 

Is there any way to prevent this?  I want to be able to update (PATCH) the selected record without the Dropdown moving away from that selection.

Categories:
I have the same question (0)
  • Verified answer
    Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    You can add a variable to the OnChange, then set the "Default" for your Dropdown to that same variable. Something like:

     

    OnChange: 

    Patch('SharePoint List', Dropdown.Selected,Status:Self.Text});
    Set(varDropdown,Self.SelectedText.Value)

     

    Default:

    varDropdown
  • BostonSailor Profile Picture
    154 on at

    Thank you, Rusk. That appears to work fine. 

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 490

#2
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 381

Last 30 days Overall leaderboard