cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wnguyen23
Level: Powered On

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
Super User
Super User

Re: Copy large number of items from SharePoint List to SharePoint List

@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
4 REPLIES 4
Super User
Super User

Re: Copy large number of items from SharePoint List to SharePoint List

@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
wnguyen23
Level: Powered On

Re: Copy large number of items from SharePoint List to SharePoint List

@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!

Highlighted
Super User
Super User

Re: Copy large number of items from SharePoint List to SharePoint List

@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
wnguyen23
Level: Powered On

Re: Copy large number of items from SharePoint List to SharePoint List

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

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 56 members 4,942 guests
Recent signins:
Please welcome our newest community members: