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

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Record not updating after Patch / Refresh

(0) ShareShare
ReportReport
Posted on by 5
Hello,
 
so I am building an App. In the beginning of the app, I set the variable processRecord and assign it a record from a table.
Throughout the app, I update the table with the Patch function (Patch(processTable, processRecord, { processStatus: "Done" } ). Still the processRecord will show the old value for processStatus "Ongoing".
 
But the changes I do are not reflected in the processRecord. Is this a static variable? (meaning it saves the current values of the record, rather just being a link to the record)
And is there a way to refresh it? Rerfesh(processRecord) and Refresh (processTable) are not working.
 
Thanks in advance!
I have the same question (0)
  • MS.Ragavendar Profile Picture
    4,553 Super User 2025 Season 2 on at
    Record not updating after Patch / Refresh
     
    Try this formula, it will show if there is any error in the formula
    Set(
        varResult,
        Patch(
            processTable,
            processRecord,
            { processStatus: "Done" }
        )
    );
    
    // Check success
    If(
        !IsBlank(varResult.ID),
        Notify("Update successful!", NotificationType.Success),
        Notify("Update failed!", NotificationType.Error)
    );
     
    Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
  • Verified answer
    stum Profile Picture
    89 on at
    Record not updating after Patch / Refresh
    Hi,
     

    When you do something like:

    Set(processRecord, LookUp(processTable, ID = someID));
     

    You are storing a snapshot of the record. Power Apps does not keep variables “linked” to their data source.

    So when you run:

    Patch(processTable, processRecord, { processStatus: "Done" })
     

    You are correctly updating the table but not the variable, because the variable does not update automatically. 

    You can use the output of Patch to set processRecord. Patch() returns the updated record. So you can do:
     
    Set(
        processRecord,
        Patch(processTable, processRecord, { processStatus: "Done" })
    );


     
     
  • LE-12110904-0 Profile Picture
    5 on at
    Record not updating after Patch / Refresh
    Thanks for the answers. I ended up doing it like proposed:
     
    // After each patch
    Set(processRecord, LookUp(processTable, ID = processRecord.ID));
    Did not know the record is just a local copy. From other programming languages I assumed, it references the record in the table and would update automatically.

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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 658 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 380 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 242 Super User 2025 Season 2

Last 30 days Overall leaderboard