Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

SP List has more then 2000 rows, Records are missing in Browsegallery

(0) ShareShare
ReportReport
Posted on by 909 Super User 2024 Season 1

Hi,

 

I have 2000+ records in my SP list. I cannot some records in my app. 

 

What I have tried - 

 

1) I changed the settings of data row limit to 2000.

2) OnStart of App - 

 

Concurrent(
ClearCollect(col1, Filter(testme_1, ID >= 1 && ID <= 2000)),
ClearCollect(col2, Filter(testme_1, ID >= 2001 && ID <= 4000)),
ClearCollect(col3, Filter(testme_1, ID >= 4001 && ID <= 5000))
);
ClearCollect(MergedCollection, col1, col2, col3)

 

then in my browsegallery i have -

 

SortByColumns(Filter([@MergedCollection],

 

('Assigned to'.Email = User().Email And (Status = "In Progress" Or Status = "NOT STARTED"))


), "Title", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))

 

 

However I am still missing my records in my browsegallery. Anything I am doing wrong here?

  • Pstork1 Profile Picture
    66,004 Most Valuable Professional on at
    Re: SP List has more then 2000 rows, Records are missing in Browsegallery

    Using the User() function inside a filter statement makes it non-delegable because the back end data source doesn't know the function. But passing it a value is delegable.  Just put the set in OnStart or OnVisible for the first page or somewhere like that. It doesn't change after the user starts the program so it only needs to run once.

  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: SP List has more then 2000 rows, Records are missing in Browsegallery

    @Pstork1  thanks, why are you making the current email variable? is that its easier to read? Getting an error on it.

    wonka1234_0-1711986430178.png

     

    also Status is not a choice column, its a single line of text.

  • Verified answer
    Pstork1 Profile Picture
    66,004 Most Valuable Professional on at
    Re: SP List has more then 2000 rows, Records are missing in Browsegallery

    Your onStart won't work because the only delegable operator allowed with the ID is =. So your ClearCollect statements aren't delegable.  A better solution is to filter your gallery using delegable functions to get the size down below 2,000. User's won't scroll through a gallery that large anyway.  I would suggest the following code assuming that Status is a Choice column.

    Set(currentEmail, User().Email);
    SortByColumns(Filter(DataSourceName,
     ('Assigned to'.Email = currentEmail && (Status.value = "In Progress" || Status.value = "NOT STARTED"))
    ), "Title", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard