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 function not upd...
Power Apps
Answered

Patch function not updating the record and there are no errors on OnSelect

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

Maybe you can help me out with the below:

 

I am using the patch function to update my record. The formula is correct and does not give me errors but it does not update my record in SharePoint list as intended:

 

Patch('Intake Copy2',LookUp('Intake Copy2',[@ID]=IntakeGalery.Selected.ID),{Status:{Value:"Completed"}});SubmitForm(IntakeForm);

 

It seems correct but it is not updating the record when I click that button.

 

When I add a patch for a new record: it works, it creates a new record on completed: 

Patch('Intake Copy2',Defaults('Intake Copy2'), {Status:{Value:"Completed"}});SubmitForm(IntakeForm);

 

For a context: I am building the App from scratch and connected to my existing ShatePoint List (IntakeCopy2)

 

I am not sure where the problem could be.

Many thanks in advance.

patch screenshot.PNG
Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Screenshot of OnSelect formula:

    Vaida_0-1667416386504.png

     

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Try

    Patch('Intake Copy2',ID=IntakeGalery.Selected.ID,{Status:{Value:"Completed"}});SubmitForm(IntakeForm);
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for coming back to me!

     

    Unfortunately, this formula gives me error on OnSelect..

    Vaida_0-1667420448928.png

     

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Hover over the various parts of the underlined error slowly, it should give you some more detailed info on the error. The way you have the data written I assume the status column is a multiple choice select column yes?

  • Spamrancher Profile Picture
    345 on at

    When you say you're not getting any errors, what do you mean? I do not see any error trapping in your formula. Consider this:

    UpdateContext({lPatchedRecord: Patch('Intake Copy2',Defaults('Intake Copy2'), {Status:{Value:"Completed"}})});
    If(IsBlank(lPatchedRecord), Notify(First(Errors('Intake Copy2', lPatchedRecord)).Message)

     

    This also returns the patched record, so even if you do not get any errors, you can see the record and make sure it contains the correct data.

  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    @Anonymous 

    I'm pretty sure that what @TheRobRush  intended to say was this:

    UpdateIf('Intake Copy2',ID=IntakeGalery.Selected.ID,{Status:{Value:"Completed"}});
    SubmitForm(IntakeForm);
    

    Also, are you updating the same record when you call SubmitForm? If you call Patch/UpdateIf first, there's a possibility that you'll overwrite your initial change with the call to SubmitForm.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @timl Thanks, but this also gives me an error on OnSelect.

     

    I think there could be something to due with the fact that I am doing in the Apps, creating a new app from scratch and connecting it to my SharePoint List. The records also do not update even if I select the status manually and submit the form. 

     

    Previously I did the same via SharePoint list - Integrate - PowerApps - Customize Form, and it all worked well.

     

     

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Haha yes @timl. thanks for catching that

  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    @Anonymous - going back to what @TheRobRush says, what's the data type of your status column? Is it a multiple choice select column?

    I'd also recommend trying @Spamrancher's approach, which would allow you to check what's happened by inspecting lPatchedRecord.

    UpdateContext({lPatchedRecord: Patch('Intake Copy2',LookUp('Intake Copy2',[@ID]=IntakeGalery.Selected.ID), {Status:{Value:"Completed"}})});
    If(IsBlank(lPatchedRecord), Notify(First(Errors('Intake Copy2', lPatchedRecord)).Message)

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @timl thank you so much, this formula looks good on OnSelect, but again - when I click the button - the status does not change to completed..

     

    My data type is choice column with several choices , only single choice possible

    My 

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 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard