cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How can I bulk update a SharePoint list with specific values in a collection without delegation issues?

I have a collection containing changes to a SharePoint list that I want to patch en masse to my list. I am considered delegation is going to be problem.

 

Here is a sample of the Items list:

 

IDNameItemStatus
1BillMarketing0
2JaneAccounting1
3MarkIT1


My colChanges collection is as follows:

IDNameItemStatus
1BillMarketing2
3MarkIT2

 

I want to patch the changes to the Status column to the Items SP list simultaneously. I know I'll need ForAll and Patch, but I cannot figure out how to do it without running into delegation issues.

5 REPLIES 5
mdevaney
Super User
Super User

@Anonymous 

Will this work?

ForAll(
  colChanges,
  Patch(your_items_list, LookUp(your_items_list ,ID=colChanges[@ID]), {Status: colChanges[@Status])
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Anonymous
Not applicable

@mdevaney, thanks for responding. Unfortunately, no because that creates a delegation warning that hampers the functionality of the patch due to SharePoint not currently supporting certain actions on the native ID column. 

@Anonymous 
If the ID field cannot be delegated then the best way to perform a bulk update might be sending the Collection to MS Flow and having it perform the update. 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Anonymous
Not applicable

I like the way you think. I'll do it that way. Hoping a native Power Apps solution becomes available soon. Thanks for your help!

@Anonymous 

I too would enjoy a native PowerApps solution.  I prefer to use as few Flows as possible when building a PowerApp (low-flow LOL) so I am always looking for a workaround.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,856)