cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
xecho
Helper I
Helper I

SP list > 2000 getting all items

Hi,

 

I have a SP list (Calendar) with >5000 items and I want to read all items into a collection.

 

I tried this:

ClearCollect(MyCollection, Filter(CalendarList, ID < 2000), Filter(CalendarList, ID > 2000 && ID < 4000));

 

But this will only read the first 2000 items into the list and even if I only want to have item# 2000-4000, I won't get any item.

 

Supposedly, ID should be an indexed column in SP, and therefore I should not have the delegation warning, but I do see that warning.

 

How can I solve this?

 

Thanks,

Bart

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @xecho ,

The ID column in Sharepoint is only Delegable for equals = , not for greater / less than > <.

You can do a collection of all items in a list, but you need another unique value numeric field. I keep a "shadow ID" on every record in my big lists set to the ID number at record creation. I have a blog section with the required code, but I suggest you also read this blog on Delegation of mine.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @xecho ,

The ID column in Sharepoint is only Delegable for equals = , not for greater / less than > <.

You can do a collection of all items in a list, but you need another unique value numeric field. I keep a "shadow ID" on every record in my big lists set to the ID number at record creation. I have a blog section with the required code, but I suggest you also read this blog on Delegation of mine.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

WarrenBelz
Super User
Super User

Hi @xecho ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi Warren,

Sorry was a few days off. Yes it helped because I found that just getting the latest 2000 records works fine for me and using the sort of the ID I can get these.

 

Thanks for all you help!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,484)