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 / Unable to Patch a coll...
Power Apps
Answered

Unable to Patch a collection to a Sharepoint List

(0) ShareShare
ReportReport
Posted on by 50

As part of an app I am developing I need to be able to patch the contents of a collection to a sharepoint list. I want to avoid using a forall loop as the number of records will be quite large and that would be quite a slow procedure.

 

Basically I iterate through a list of items and depending on criteria it will add completed item to a collection that the user is able to look through and check, make changes etc. Once they have confirmed the data in the three different collections one of them is used to update each of the records within it (originate from Deductions list) to inactive.

 

This is how I'm building the collection:

 

 

ForAll( 
 Filter(Deductions, DeductionActive = 1 && RecurringDeduction = 0 && WorkerId = WorkerID) As Deduction,
//... Do some other stuff, generate values etc
 If(
 (Deduction.TotalDeduction - CompletedDeduction - DeductAmount) = 0,
 Collect(FinishedDeductions, Deduction);
 Collect(FinishedUpdates, {Active: 0})
 )
);

 

 

 

This is How I am trying to patch the collection back to power apps:

 

 

Patch(
 Deductions,
 FinishedDeductions, 
 FinishedUpdates
);

 

 

 

The collections are being filled correctly and all looks good however I continue to get the same error in the patch function. 

 

Constrictor64_0-1669268519059.png

 

As far as I can tell, power apps documentation suggests this is doable:

Patch function in Power Apps (contains video) - Power Platform | Microsoft Learn.

 

Any thoughts on whats gone wrong?

Categories:
  • Verified answer
    Constrictor64 Profile Picture
    50 on at

    Hey guys,

     

    Not sure why but this started to work as expected after a couple days with no code changes.

     

    Bit of a pain but here we are.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard