cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Re: How can I efficiently load 10,000 items from a SharePoint List into a Collection?

@yashag2255,

 

I just noticed that the ListItems collection includes some duplicates that need to be removed. How can I correct this? Here is the code I modified based on our previous discussion:

 

ClearCollect(LoopCount,FirstN([0, 2000, 4000, 6000, 8000, 10000, 12000],RoundUp(First(Sort('Item Tracker',ID,Descending)).ID/2000,0)));

Clear(ListItems);
ForAll(LoopCount,Collect(ListItems,Filter('Item Tracker',ID > Value)));

Highlighted
Dual Super User III
Dual Super User III

Re: How can I efficiently load 10,000 items from a SharePoint List into a Collection?

@pwrappr01  Do you have duplicates in your SP list or is it getting collected inside the collection?

Highlighted
Helper V
Helper V

Re: How can I efficiently load 10,000 items from a SharePoint List into a Collection?

@yashag2255,

 

I just verified my SP List to ensure there were no duplicates there.

Highlighted
Frequent Visitor

Re: How can I efficiently load 10,000 items from a SharePoint List into a Collection?


@pwrappr01 wrote:

@yashag2255,

 

I just noticed that the ListItems collection includes some duplicates that need to be removed. How can I correct this? Here is the code I modified based on our previous discussion:

 

ClearCollect(LoopCount,FirstN([0, 2000, 4000, 6000, 8000, 10000, 12000],RoundUp(First(Sort('Item Tracker',ID,Descending)).ID/2000,0)));

Clear(ListItems);
ForAll(LoopCount,Collect(ListItems,Filter('Item Tracker',ID > Value)));


 

Thanks for your solution. 

For SharePoint this seems to be working, but it isn't for Excel.

 

 

Highlighted
Frequent Visitor

Re: How can I efficiently load 10,000 items from a SharePoint List into a Collection?

is it still working? ID is giving delegation warning now and count limited to 2000.

Highlighted
Regular Visitor

Re: How can I efficiently load 10,000 items from a SharePoint List into a Collection?

I don't know what I'm doing wrong, but it didn't work, I only managed to get 2000 item ...

 

Put the code in App-Onstart: 

 

ClearCollect(loopC,FirstN([0,2000,4000,6000,8000,10000,12000,14000,16000],
RoundUp(First(Sort(ShipToList,ID,Descending)).ID/2000,0)));

Clear(ItemShipTo);
ForAll(loopC, Collect(ItemShipTo, Filter(ShipToList, ID > Value)));

 

Your help please!

 

 

Highlighted
Regular Visitor

Re: How can I efficiently load 10,000 items from a SharePoint List into a Collection?

I am running into the same issue that @Odiseo55 is having.  Would love to hear if anyone was able to figure that out!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (8,504)