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 / Empty fields show valu...
Power Apps
Suggested Answer

Empty fields show values ​​from the previously selected item.

(0) ShareShare
ReportReport
Posted on by 162
Hello,
 
I have created a Power App with a modern form and connected to a SharePoint list. I added two list items to the SharePoint, one all fields filled out and one item with empty fields.

When I select items in the gallery one by one, only the filled-in fields on the form change. The values ​​from the previous item remain visible in the empty fields. I also have an icon that turns to red when there is an empty field and the color of the icon changes when switching to another item.
 
Does anyone have any ideas how to solve this?
 
Thanks in advance for your help.
 
Kind regards,
 
Hans
Categories:
I have the same question (0)
  • Suggested answer
    Sunil Kumar Pashikanti Profile Picture
    2,318 Moderator on at
     
    This issue occurs because of how the Modern Form handles "null" or empty values from your SharePoint data source. When you switch items in your Gallery, if the new record has a blank field, the modern control occasionally fails to "flush" the previous value because it doesn't see a new value to replace it with.
     
    Go to your Gallery, select the OnSelect property, and add a ResetForm command before or after you handle the selection:
     
    ResetForm(YourFormName); 
    Select(Parent); // If you have other logic here
     
    It forces every DataCard and Input control within the form to revert to its Default state (which will be blank for your empty record) before it tries to render the new selection. If this does not work, then the datacards in the form might be misconfigured.
     
    Hope your form item property is set to your gallery.Selected.
     
    The reason your icon color changes correctly while the text stays "stuck" is that the Icon is likely looking directly at the Gallery selection (e.g., IsBlank(Gallery.Selected.Field)), whereas the Form's internal controls are waiting for a "Change" event that isn't triggering for empty strings.
    To keep your icon synced and accurate: Ensure the Color property of your icon uses the same logic as the form:
    If(IsBlank(YourFormName.LastSubmit.FieldName) || IsBlank(YourFormName.Updates.FieldName), Color.Red, Color.Green)
     
    ✅ If this answer helped resolve your issue, please mark it as Accepted so it can help others with the same problem.
    👍 Feel free to Like the post if you found it useful.
     
     
     
  • Rapaille Profile Picture
    162 on at
    Hello @Sunil Kumar Pashikanti, thank you for thinking along with me.
     
    Unfortunately, I get an error when I try your suggestion.

  • Sunil Kumar Pashikanti Profile Picture
    2,318 Moderator on at
     
    Select(Parent)    // bubbles up the Gallery Event. It should not keep inside the OnSelect property of gallery.
     
    You just add the ResetForm(Form1) in the OnSelect Properyt of your Gallery1, and keep your existing code as it is. Remove the Select(Parent) from Gallery1.OnSelect property.

    This is the only change you do with your existing code. It helps to refresh the form before assigning new values.
  • Rapaille Profile Picture
    162 on at
     
    Adding ResetForm(Form1) in the OnSelect Propery of Gallery1 does not update the empty cells in the form.
     
    I tried to add NewForm(Form1);ResetForm(Form1) and this works. There is just a little delay in clearing the empty cells.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard