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 / Form fields display va...
Power Apps
Answered

Form fields display values from another record

(1) ShareShare
ReportReport
Posted on by 893 Super User 2026 Season 1
Hello -
 
This is prototype app under construction.
 
I have an issue with a Form control displaying values in fields that are actually blank in the table. This happens when navigating from another record in the gallery that has those same fields filled in.
See series of screen shots.
 
Any idea why this happening?
Can I provide other details of the app to help troubleshoot?
 
Thanks for any guidance!
 
 
 
 
Navigate to another record ...
 
Navigate back to record 100202
 
Categories:
I have the same question (0)
  • Suggested answer
    Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    Hello @Cgangweg01
     
    Yes, you can reset the variable and form control and use this variable in the form’s Item property like this.
     

    On the gallery OnSelect:

    UpdateContext({_selectedItem:Blank()});
    ResetForm(YourFormName); //YourFormName - Replace with your form name
    UpdateContext({_selectedItem:ThisItem});
     
    Form Item Property: 
    _selectedItem

    Resetting the form forces it to reload the selected record and prevents values from carrying over when fields are blank.

     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------
     
    📩 Need more help? Mention @Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping!
  • Cgangweg01 Profile Picture
    893 Super User 2026 Season 1 on at
    Thank you @Kalathiya
     
    Giving that a try.
     
    What do I do with the ViewForm expression in the Gallery OnSelect property?
     
    //ResetForm(Form1);ViewForm(Form1)
  • Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    @Cgangweg01, Not an issue, you can still use ViewForm. Just make sure you also set the variable and reset the form, like this:
     
    Updated code: 
    UpdateContext({_selectedItem:Blank()});
    ResetForm(Form1);ViewForm(Form1); //Form1 - Replace with your form name
    UpdateContext({_selectedItem:ThisItem});
     
    Hope this worked! Let me know if it’s showing the selected record correctly now.
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
  • Cgangweg01 Profile Picture
    893 Super User 2026 Season 1 on at
     
    Thank you so much for the replies.
    It didn't work. I'll try again later.
    I'm sure it is something else I've already done in the app interfering with your suggestion.
    What else can I share with you?
  • Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    Hello @Cgangweg01
     
    If it’s still not working, it’s probably something else is affecting the form.
     
    To help troubleshoot, it would be great if you could share:
    #1. The gallery OnSelect formula
    #2. The form’s Item property
    #3. Whether it’s an EditForm or DisplayForm that your are using
    #4. Any other formulas that you have writen in Default Property or anywhere if yes, please share. 
  • Cgangweg01 Profile Picture
    893 Super User 2026 Season 1 on at
     
    Really appreciate your help.
     
    I added the suggestions above again and it seemed to work at first when previewing but then when I played the app the issue started again and then previewed again the issue was back. Very strange.
     
    Various screen shots to help troubleshoot ...
     
    Gallery OnSelect as suggested
     
    Gallery items - I need conditional filtering
     
     
     
     
    Form items as suggested ...
     
    Edit Form?
    Form ...
     
  • Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    Hello @Cgangweg01

    In Play mode, please perform a hard reload until the new version notification appears.

    If you’re still facing the same issue:

    #1. In the Default property of these three fields, what value have you entered?

    #2. Have you added any custom code? If yes, please share a screenshot.

    Alternatively, you can try the following code in the Form Item Property:

    LookUp(YourTableName,ID=_selectedItem.ID) //YourTableName - Replace with - your table or list name
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
  • Cgangweg01 Profile Picture
    893 Super User 2026 Season 1 on at
    Hi again @Kalathiya
     
    No custom code to share.
    All the fields on the Form have this as their data card Default value.
     
    ThisItem.  the field
     
     
    Also, it appears to only happen to Number column fields.
  • Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    Hello @Cgangweg01

    Could you please try the approach below?

    Write the code in the control’s Value property inside the DataCard in the form.

    Please apply this to all 3 columns where the values are not updating.

    Value Property:

     
    _selectedItem.ColumnName  
    
    // _selectedItem = variable name, ColumnName = column name.
    // Replace with your actual names.
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
     
  • Cgangweg01 Profile Picture
    893 Super User 2026 Season 1 on at
    Hello @Kalathiya
     
    Expression valid but that didn't work. Still showing values from previous record.
     
     
     
     
     
    Below is what AI-Copilot said but I don't understand its recommendations. I don't think they fit.
     
     
    ************************************************************************

    Thanks — Number Input (modern) + Dataverse Decimal is the exact combo where this “shows values from the previous record when the new record is blank” commonly happens.

    What’s wrong (root cause)

    ✅ The modern Number Input control can’t truly display Blank()

    When Hours1 is blank in Dataverse (Blank() / null), the Form tries to push that blank into the control. But the Number Input’s internal Value is a number, not “nullable”. So when it receives blank, it often:

    • keeps the previous numeric value already in the control state, or

    • falls back to a default (often 0) depending on your config

    This is why it looks like record B “has” Hours1 even though the table is blank — it’s a UI control state issue, not Dataverse “copying values”.

    ✅ Dynamic mode switching (View/Edit/New) can preserve control state

    When you switch modes without resetting, the card controls may retain their last entered/displayed value until explicitly reset/rebound.

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