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 / Errors with Patch when...
Power Apps
Answered

Errors with Patch when trying to update multiple fields in a record

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello, I need to update multiple fields in one record in a SharePoint list when the user clicks a submit button in a Gallery: It works fine for one field, but when I try to add any others I get errors, and it also gives errors when I try to simply update any of the other fields. I may be starting from the wrong place. Your help will save me a ton of time, thanks in advance!

This works great and updates the SP list with the person's name from the people picker:

Patch(
'My SharePoint list',
LookUp('My SharePoint list', ID = My_Customer_BrowseGallery.Selected.MyrecordID),
{
'PersonsName': ChooseName_Request_Box.Selected
}
)

This gives errors - when I try to add the text update into other fields:

Patch(
'My SharePoint list',
LookUp('My SharePoint list', ID = My_BrowseGallery.Selected.MyrecordID),
{
'PersonsName': ChooseName_Request_Box.Selected,
'MatchStatus': "Response required",

'Followups': "Send email"

}
)

)

Curiously, the following also gives an error (when I try to update one text entry, without including the people picker) :

Patch(
'My SharePoint list',
LookUp('My SharePoint list', ID = Customer_BrowseGallery.Selected.MyrecordID),
{
'MatchStatus': "Response required",
}
)

)

 

Thank you again!

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @alygator ,

     

    Could you tell me:

    What's the error?

    What's the data type of 'MatchStatus' ? Is it a Single line of text column?

     

    Is there an extra ")" at the end of the code?

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

  • alygator Profile Picture
    Microsoft Employee on at

    Thank you! The error is red squiggly lines (please see screenshot).  The data type of the 'MatchStatus' field in PowerApps is "Complex" and in the SP list it is "Choice." 
    You are right, in my copy-and-paste I added an extra ")" at the end of the code - that is not actually present in the app that I'm working on, however - the screenshot shows the real code.

    app_error_03.png
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @alygator ,

     

    If the data type of 'MatchStatus' column is Choice, you could try the following formula:

    Patch(
    'My SharePoint list',
    LookUp('My SharePoint list', ID = Customer_BrowseGallery.Selected.MyrecordID),
    {
    'MatchStatus': {Value:"Response required"}
    }
    )

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

  • Verified answer
    alygator Profile Picture
    Microsoft Employee on at

    Thank you SO much! This is working for me. Moving the braces in the MatchStatus line solved it.

    Patch(
    'My SharePoint list', LookUp('My SharePoint list', TenantID = Customer_BrowseGallery.Selected.TenantID),
    {
    'MatchStatus': {Value:"Response required"},
    'Executive': ChooseName_Request_Box.Selected
    }
    )

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

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard