Notifications
Announcements
https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/pagingtotalResultCount is returning -1 when the total is greater than 5000. I'm guessing this is by design, but couldn't see a comment in the documentation. Thought I would mention and confirm here just in case I'm doing something wrong. Anyone else seen this behaviour?
Yes, its by design since the server doesn't return total count when there are more than 5000 records
Thanks for the confirmation. Would be great for documentation to mention this for others.
This didn't use to work that way - not sure when it changed. Did you figure out a work around for this @skoofy5 ?
The only workaround you have is to manage the return of -1 and have your control understand it.
The API only returns a maximum of 5000 records, so it makes sense that it cannot return a definitive count for anything over that and it also make sense that it can't return a number of >5000 (because that would be a string at that point). You could do an aggregate call to try and count the records, but it would need to match any filtering you might do as well as have the new limitation of 50,000 records. Given that I just opted to show -1 as 5000+ when I had a pageSize greater than 0 and totalResultCount equals -1. Hope that helps.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 386 Most Valuable Professional
Kalathiya 361
MS.Ragavendar 339 Super User 2025 Season 2