cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Using 'Collect' to bulk update a SharePoint Library

I got a problem using 'Collect' function to bulk update a Sharepoint Library. Using: Collect(CollectionName, Library) will happily create a collection of the whole library in one stroke. However, using a similar method to bulk update a library from a collection doesn’t work, i.e Collect(Library, CollectionName) will not upload the contents of the collection into the Library. I would be grateful if someone can fix this formula.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

I think (haven't tried this exact scenario) when you are collecting from the SP Library you are only collecting the meta-data, not the actual files, so even if you were able to collect your modified data from PowerApps back to SP, I don't think you'd see the result you are after.

Rather than replacing the existing library, perhaps you would be better off doing a ForAll and Patching your changes back record by record to the existing using the ID to identify the record you want to change?

Is this a one-off exercise, are users entering the changes to the metadata in the library? Depending on the scenario you might be better off with a tool like ShareGate (or even MS Access) for this task.

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

I have succesfully used this technique previously (pushing a group of records into SharePoint from PowerApps) using the collect command. I'll try to test to see if something has changed/broken in recent updates.

Can you check that all mandatory fields in the SP list are specified and that the data types of each field match?

Note that this method, while being quicker than a ForAll / Patch, still takes some time to complete and is not transactional, so if collecting a large number of records, you'll see them start to appear one at a time in the SP list and if an error (such as a loss of connection) occurs, you will end up with a partial update (some, but not all, records were written to the SP list).

Highlighted
Frequent Visitor

Hi Paul, Thanks for the quick feedback.

First, I’m dealing with a ‘Library’ rather than a ‘List’. The function ‘Collect’ successfully made a true replica of the whole SharePoint Library (so naming of columns is 100% identical).

The reason for this whole exercise is that after creating the collection and applying some changes to the its values, I’d like to load back this collection to SharePoint replacing the original Library.

I guess my wish-formula ‘Collect(Library, CollectionName)’ would be better than using ‘Patch’ which would require one-by-one comparison of columns using unnecessary complicated formula.

Thanks again and I hope help finding a solution to my problem… Cheers, Hamada

Highlighted

I think (haven't tried this exact scenario) when you are collecting from the SP Library you are only collecting the meta-data, not the actual files, so even if you were able to collect your modified data from PowerApps back to SP, I don't think you'd see the result you are after.

Rather than replacing the existing library, perhaps you would be better off doing a ForAll and Patching your changes back record by record to the existing using the ID to identify the record you want to change?

Is this a one-off exercise, are users entering the changes to the metadata in the library? Depending on the scenario you might be better off with a tool like ShareGate (or even MS Access) for this task.

View solution in original post

Highlighted
Frequent Visitor

OK. I'll look into that. Thanks!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (10,237)