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 / Patch intermittently f...
Power Apps
Unanswered

Patch intermittently fails to run in Canvas app

(1) ShareShare
ReportReport
Posted on by 7

We have a Canvas app where, following approval of request, a member of staff from the finance team go back into the form, update a particular field, and click a button to "Complete" the request.

The code for the button runs Patch() to update the form data, and then runs a flow.  I've just run a monitored session with one of the team, hoping to see an error message indicating why the Patch() was failing. The member of staff updated three records as normal, and clicked the "Complete" button for each.

PatchFailure_FinanceForms_2.png

The Patch() succeeded on the first and third item updates, but there's no evidence that an attempt was made to run it on the second. No conditions are set, and so it should run each time the button is clicked (the flow was triggered successfully each time):

PatchFailure_FinanceForms.png
Any suggestions on what to look at next would be welcome.

Thank you,
Rob.

Categories:
I have the same question (0)
  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Can you provide the code you are using for the patch and run please?

    I would advise to set the patch to a variable, then:
    if the variable contains data run the flow, otherwise notify there was an error saving

     

    something like this:

     

    //Clear it first so that any previous patches aren't causing false positives
    Set(PatchedItem, Blank());
    //set the output to a variable, which will store the record it was patching
    Set(PatchedItem, Patch(listname, ThisItem, {thingToPatch: valuetoPatch}));
    
    If(
     IsBlank(PatchedItem.thingToPatch),
     Notify("There was an error saving", NotificationType.Error),
     //else run the flow if patch succeeded
     FlowName.run()
    )

     

     

  • RobHCRT Profile Picture
    7 on at

    Thanks, @iAm_ManCat, have updated the code to check whether the return from Patch() is blank, and that's at least stopping the completion process half-succeeding, so the users can retry. 

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 400 Most Valuable Professional

#2
11manish Profile Picture

11manish 141 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard