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

Notifications

Announcements

Community site session details

Community site session details

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

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,325 Super User 2025 Season 2 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
    278 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard