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 / Gallery not showing it...
Power Apps
Answered

Gallery not showing items after sharepoint reached 5000 items.

(0) ShareShare
ReportReport
Posted on by 9

The data was being displayed fine until when the SharePoint list crossed 5000 entries. However, now not a single item is being displayed. This is the query I have on the Item property of the gallery.

 

SortByColumns(Database, "Created", If(SortDescending1, SortOrder.Ascending, SortOrder.Descending))

 

Is there any workaround for this?

Categories:
  • VishalJhaveri Profile Picture
    1,169 Moderator on at

    This happened with me too, so I feel eligible to answer the question.

    If you remove the SortByColumns function, everything will seem to work fine. 

    Store the values/records in a collection first, and then sort the collection instead of directly sorting the Database.

     

    If my answer helps you, please mark it as solution.

     

  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @alJohSe ,

     

    Please open your list setting and add the 'Created' column index for it.

    vxiaochenmsft_0-1715665867201.png

    vxiaochenmsft_1-1715665884726.png

     

     

     

    Best Regards,

    Wearsky

  • alJohSe Profile Picture
    9 on at

    Thank you for the reply, but unfortunately that did not work for me. The collection didn't take more than 2000 records from the SharePoint, I tried creating multiple collections but that didn't work as well.

    Concurrent(
    ClearCollect(CollectionA,'Datasource'),
    ClearCollect(CollectionB,Filter('Datasource',ID>2000 And ID<=4000)),
    ClearCollect(CollectionC,Filter('Datasource',ID>4000 And ID<=6000))
    );
    Collect(colCombined,CollectionA,CollectionB,CollectionC,CollectionD);

     

  • alJohSe Profile Picture
    9 on at

    Thank you for the reply @v-xiaochen-msft ,
    This did work, can you please explain what this did? Or if you can share some materials for it I would appreciate it.

  • VishalJhaveri Profile Picture
    1,169 Moderator on at

    Yes, I never said it will take more than 2000 records. 

    You need to use these links to fetch more than 2000 records.

     

    Overcome 2000 items limit using Power Apps Collect function • Tomasz Poszytek, Business Applications MVP Re: 500 item limit in CDM entity search filter(nee... - Page 4 - Power Platform Community (microsoft.com) -> Scroll down in this link and find Mr. Dang(user) Solution How to overcome 500 items limit in PowerApps - CEO-Refleksje (michalguzowski.pl)

     

    Please mark my answer as solution if it helped you even a little bit.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard