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 / Is delegation possible...
Power Apps
Answered

Is delegation possible when patching an existing SharePoint item?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

It seems that when patching an existing SharePoint item, the "First" function (which is non-delagable) is required to identify only one record. Is anyone aware of a delagable method to patch a record? I am trying to scale-up an app that would connect to a SharePoint list that I anticipate could have >10,000 items. Thanks for any help!

 

Background: I created an app that allows students to write practice questions, practice and rate questions created by other students, earn points for highly-rateq questions they authored and answering questions correctly, etc (see attached for some documentation if interested). It works well for one course, but I was hoping to make it available to the University by adding a course ID.

Categories:
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous,

    You can use Lookup(), Filter(), "= ", and StartsWith() in Sharepoint as these are all delegatable functions and should be sufficient to identify a unique record to Patch.  Sharepoint automatically creates a Primary key (ID) for every list and that can be filtered in a Patch() function. The syntax for editing a record is Patch( DataSource, BaseRecord, ChangeRecord1 [, ChangeRecord2, … ]).  So for example, a BaseRecord can by found by Lookup(Datasource, ID = Gallery.Selected.ID) without worrying about delegation. 

    Tip: Remember to index searchable columns in large Sharepoint lists, {I believe that the ID column is automatically indexed).

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you, @Drrickryp! I had no idea you could use LookUp within a Patch to identify the record. DMTWD (Dumped my trunks with delight)!!

  • SJ-15052312-0 Profile Picture
    418 on at

    @Drrickryp is delegation necessary for Patch()?  If this user didn't include lookup() or filter() would the patch not update the record if it was the 501st record in sharepoint?  

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @samuelJ 

    Patch() requires three elements, a datasource, a record to patch (or a new record indicated by Defaults(), and the field or fields that must be patched. If you don't specify the record being modified, there is no way for PowerApps to identify 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

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
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard