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 to Update Existi...
Power Apps
Answered

Patch to Update Existing Record - SharePoint List Data Source

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have an occasion to use Patch() to update an existing record outside of the context of a form or a gallery.  I have a file uploader using an attachment control and when upload is successful (i.e., OnAddFile), I need to execute a Patch() to update a choice field, 'Status' in SP.  My issue is that Power Apps does not recognize 'Title' the default single line text column inherent with every SP list. The formula throws an error saying it does not recognize the Title as a valid column in the SP list.  The dropdownOppName.Selected.Title is working and retrieving the correct record so it's just the Title column is not recognized. Any recommendations?

 

Patch('Signatures', 'Title' = dropdownOppName.Selected.Title, {Status.Value: 'Contract Docs Received'})

 

 

Categories:
I have the same question (0)
  • C-Papa Profile Picture
    1,836 on at

    Does it work if you change 

    dropdownOppName.Selected.Title

    to 

    dropdownOppName.Selected.Value

    or 

    dropdownOppName.Selected.Result

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for the response.  That dropdown menu has the Items property set to display OppName while also making related columns available and that is working as expected (see code below).  The issue is Title is not recognized within the Patch() formula which is very odd behavior.

    Filter(SortByColumns(ShowColumns(colSignatures, "OppName", "OppID", "Status", "DueDate", "SignatureName", "LegalRep", "Requestor", "Title"), "OppName"), Status.Value <> "Archived")

     

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Do you want to patch an existing record to you SP list?

    Could you please share a bit more about the scenario?

    Here is a standard Patch function, a base record is required if you want to update an existing record. 

    PatchDataSourceBaseRecordChangeRecord1 [, ChangeRecord2, … ])

    The formula you provided does not have a record, the parameter you referred in invalid.

    'Title' = dropdownOppName.Selected.Title

    Do you want to update the record that title has the Dropdown selected value?

    Please modify your formula as below:

    Patch('Signatures', 
     LookUp('Signatures','Title' = dropdownOppName.Selected.Title), 
     {Status: {Value:"xxx"}}
     )

    Note that you should update a Choice column as below

    {ChoiceColumn:{Value:"xxx"}}

    Note that you should specify a certain value rather than a column name for the Choice column.

    Check if it helps.

    Regards,

    Qi

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-qiuyu-msft - Thank you for the detailed response!  You provided the solution as shown below.

    Patch('Signatures', 
     LookUp('Signatures','Title' = dropdownOppName.Selected.Title), 
     {Status: {Value: "Contract Docs Receieved"}}
    )

     

  • andrewmccourt64 Profile Picture
    14 on at

    How can you get this to work if your base sharepoint list is >10,000 records? Lookup() will only check the top 2000 rows or so won't it?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard