web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sharepoint List over 2...
Power Apps
Suggested Answer

Sharepoint List over 2000 records

(1) ShareShare
ReportReport
Posted on by 42
This code for BrowseGallery worked fine until the SharePoint List exceeded 2000 records.  Now the gallery shows no records.  I have experimented with a few solutions but had no luck.  I like the concept of creating a collection based on criteria and displaying the results, but I'm not sure how to implement.  Any help would be appreciated.  Thanks.
 
SortByColumns(Filter('Extrusion Replenishment', StartsWith(Item.Value, TextSearchBox1.Text), Text(DateValue(Created), "dd/mm/yyyy") = Text(DateValue(DatePicker1.SelectedDate), "dd/mm/yyyy")), "Created", SortOrder.Descending)
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,974 Moderator on at
    HI,
     
    So your gallery displays nothing?
     
    Well I am guessing that your Code has Delegation Issues. In your design studio, does it have a yellow underline and say it has delegation issues?
     
  • IAmIntractable Profile Picture
    280 on at
    The number of rows in the list only affects the number of rows returned based on the search criteria. I have lists with tens of thousands of rows. Note that a 2000 row gallery may be slow to render.
     
    I would assign your items query below to a collection to see if any rows are returned. If none are, then your criteria is wrong. Note also that Starts with is case sensitive so perhaps there is no match.
     
    SortByColumns(Filter('Extrusion Replenishment', StartsWith(Item.Value, TextSearchBox1.Text), Text(DateValue(Created), "dd/mm/yyyy") = Text(DateValue(DatePicker1.SelectedDate), "dd/mm/yyyy")), "Created", SortOrder.Descending)
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
    Hi 
     
    You can use this amazing formula by Tomasz Poszytek on the OnStart of your app to collect more than 2000 or any number of items (don't forget to replace the list names and other values) - 
    Set(
        firstRecord,
        First('Large List')
    );
    Set(
        lastRecord,
        First(
            Sort(
                'Large List',
                ID,
                Descending
            )
        )
    );
    Set(
        iterationsNo,
        RoundUp(
            (lastRecord.ID - firstRecord.ID) / 500,
            0
        )
    );
    Collect(iterations, Sequence(iterationsNo,0));
    
    ForAll(
        iterations,
        With(
            {
                prevThreshold: Value(Value) * 500,
                nextThreshold: (Value(Value) + 1) * 500
            },
            If(
                lastRecord.ID > Value,
                Collect(
                    LargeListSP,
                    Filter(
                        'Large List',
                        ID_val > prevThreshold && ID_val <= nextThreshold
                    )
                )
            )
        )
    );
     
    Hope it helps.
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     
  • Hugoxoft Profile Picture
    4 on at
    You must create a pagination, I leave you an example:
  • jamesalspec Profile Picture
    42 on at
    @Hugoxoft @Nandit @IAmIntractable @FLMike
    Apologies, I may not have been super clear.  It shows any record up to the 2000th.  Any record after that is not shown.
     
    FLMike - you are correct.  It shows delegation warning.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 600

#2
WarrenBelz Profile Picture

WarrenBelz 478 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard