Today I found in on of my app an unexpected behaviour in related to paging in Power Apps Galleries.
I first thought that it was related to the experimental feature that I found earlier today. However this feature apparently already existed before but I never noticed it.
Count rows on galleries
Table of Contents
At the top right you can see the number of items loaded in my gallery calculated with the following expression.
CountRows(Gallery1.AllItems)
Paging in Power Apps
As I scroll down my gallery, Power Apps automatically loads the next 100 items from the SharePoint datasource. This new way of loading data seems to improve the performance of my gallery, however I can imagine that I might have to adjust some of my app where I’m relying on the usage of CountRows to give me the number of items that I’ve got in a SharePoint list.
When doing a CountRows on your data it might be better to go back to the data source or collection used to feed the Gallery.