cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wnguyen23
Helper II
Helper II

Copy large number of items from SharePoint List to SharePoint List

Hello,


I am trying to build a flow to get item from items from one SharePoint List ( latitude and longitude) and add it to a separate SharePoint List.  It works, but there are over 200 items so it'll take over 3 hours to complete.  Both list have a column ID that will compare if it matches then paste the latitude and longitude there, so it'll loop each item 200 times - so 200x200 will take forever.  Is there anyway to avoid this?

 

Thank youCapture.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions
ScottShearer
Super User III
Super User III

@wnguyen23 

Here is one solution to your issue - see screen shots below.

Rather than looping through each item in the destination list for each value in the source list, I use a Get Items inside of each loop with an OData filter.  The filter allows me to return just a single item - the item with an OLDID that matches the source rows ID.

 

Also, remember that Get Items returns 100 items by default - you'll need to set that up to a number of 200 or higher - see screen shot.

 

Also, if this is a one time thing that you won't need to repeat, you might consider using MS Access - you could link to both tables, and create an update query and update the destination list in just a few minutes.

 

OldID1.jpgOldID2.jpgOldID3.jpg

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

4 REPLIES 4
ScottShearer
Super User III
Super User III

@wnguyen23 

Here is one solution to your issue - see screen shots below.

Rather than looping through each item in the destination list for each value in the source list, I use a Get Items inside of each loop with an OData filter.  The filter allows me to return just a single item - the item with an OLDID that matches the source rows ID.

 

Also, remember that Get Items returns 100 items by default - you'll need to set that up to a number of 200 or higher - see screen shot.

 

Also, if this is a one time thing that you won't need to repeat, you might consider using MS Access - you could link to both tables, and create an update query and update the destination list in just a few minutes.

 

OldID1.jpgOldID2.jpgOldID3.jpg

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

@ScottShearer 

Thanks for the reply.  Will your solution still loop through and compare every value?  Currently it is going through and checking ID 1 (200 times, will return 1st item true and next 199 false), then check ID 2 (return 1st false, next 1 true, next 198 false), and so on...Check ID 200( return first 199 false, last item true)  I plan to run this more than once.

 

Capture.PNG

Thank you!

@wnguyen23 

My solution will loop through each item in the source list and update every matching item in the destination list (there should only be 1 matching item).

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

thanks!  that was exactly what I was looking for @ScottShearer 

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Automate User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (35,374)