cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pwrappr01 Helper IV
Helper IV

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)));

Dual Super User
Dual Super User

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
pwrappr01 Helper IV
Helper IV

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.

Rens_
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.

 

 

Karteek
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.

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,909)