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 / Gallery Items erased w...
Power Apps
Unanswered

Gallery Items erased when another control value is entered

(0) ShareShare
ReportReport
Posted on by 682

In a canvas app, I have a gallery with multiple controls. One of the controls is a dropdown control, with choices linked to an SQL table. The selection process from the SQL table works fine, selecting a Part Number (field name is PartNumber).  However, after the selection, if I modify any other control on that row, the selected dropdown value is erased and becomes blank.  I do not have any default or defaultselecteditems set up.

 

In fact, this also happens with other controls in the gallery, even text controls. They get erased when other control values are entered.

 

Has anyone encountered this before?

Categories:
I have the same question (0)
  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    This happens because your datasource is refreshed whenever you patch something to your datasource

  • 55552 Profile Picture
    682 on at

    So what is the solution?  In the text fields within the gallery, I was able to prevent the erasing of data by using UpdateIf (in the OnChange property) to update a single record and column record in a Collection with the newly entered value. Then in the default property of the same text field (or even a checkbox field), I used ThisItem.ColumnName so that the value just pushed to the Collection would return to that field.  But this does not work with a dropdown field or combo box field.

  • 55552 Profile Picture
    682 on at

    In the end, I had to update all my other editable fields in the gallery, using their OnChange property.  Within that property, I pushed the value of the field itself to a Collection, but also pushed in the selected value from the Dropdown field. This appeared to solve the issue of fields being erased when other fields were filled in.

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