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

Too many data items in collection (>2000)

Hi,

I have a SharePoint list with more than 5000 items, I have created a PowerApps application to display the data created on the current date (in a gallery) . Since my filter was giving delegation warning, I started storing the data in a collection and populating my gallery from there. From the moment the my SharePoint list exceeded 2000 items, the collection is not fetching the data and thus the gallery is not getting updated.

Code to get data from list:

ClearCollect(collectionDemo, Filter(ListName, Date=Label4.Text, WorkStatus="At site",Site=Dropdown1.SelectedText.Value))

 

Label4 = Text( Now(), "[$-en-GB]dd-mm-yyyy" )

Date, WorkStatus and Site are columns in the list.


Please Help!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Soumodip ,

As the issue that he posted @eka24 , you could load data to collection for multiple times to solve this problem.

ClearCollect(col1, Filter('YourSPList', ID >= 1 && ID <= 2000));
ClearCollect(col2, Filter('YourSPList', ID >= 2001 && ID <= 4000));
ClearCollect(col3, Filter('YourSPList', ID >= 4001 && ID <= 6000));
ClearCollect(col4, Filter('YourSPList', ID >= 6001 && ID <= 8000));
ClearCollect(col5, Filter('YourSPList', ID >= 8001 && ID <= 10000);...

Then filter then one by one.

 

 

Best regards, 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Super User III
Super User III

Follow this post to create the collection:

https://powerusers.microsoft.com/t5/Building-Power-Apps/How-can-I-efficiently-load-10-000-items-from...

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Community Support
Community Support

Hi @Soumodip ,

The reason why you met this problem is that you are filtering sharepoint list, not collection, which has delegation limit.

ClearCollect(collectionDemo, Filter(ListName, Date=Label4.Text, WorkStatus="At site",Site=Dropdown1.SelectedText.Value))

"Collection dos not have delegation limit" means that when you deal with data in collection, you will have no delegation limit.

 

To use collection to avoid delegation limit, you need to firstly save all the data in collection, then filter this collection.

For example:

1)create collection:

ClearCollect(collectionDemo,ListName)

2)set the gallery's Items:

 Filter(collectionDemo, Date=Label4.Text, WorkStatus="At site",Site=Dropdown1.SelectedText.Value)

 

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yutliu-msft ,

Now there is another problem 😞
My list has around 10K items, so when I am using:
ClearCollect(CollectionDemo, ListName)

 The collection is not storing all the values.

Read my post. The solution to the 10000 rows is there.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @Soumodip ,

As the issue that he posted @eka24 , you could load data to collection for multiple times to solve this problem.

ClearCollect(col1, Filter('YourSPList', ID >= 1 && ID <= 2000));
ClearCollect(col2, Filter('YourSPList', ID >= 2001 && ID <= 4000));
ClearCollect(col3, Filter('YourSPList', ID >= 4001 && ID <= 6000));
ClearCollect(col4, Filter('YourSPList', ID >= 6001 && ID <= 8000));
ClearCollect(col5, Filter('YourSPList', ID >= 8001 && ID <= 10000);...

Then filter then one by one.

 

 

Best regards, 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,127)