cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DHAGZ
Helper III
Helper III

gallery

Good day

asking for help.

how to count all rows in gallery without pulling the first 100 records

my formula:
CountRows(Gallery1.AllItems)

thanks and advance

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

Galleries are designed to be paged and load records 100 at a time.  So if you count the rows in a gallery you will always get the number of records that have currently been loaded through paging.  There is no way around that.  But you can do a CountRows() on the Data Source itself or whatever filtered set of Items is in the Items property of the Gallery.  That will give you the total number of records that will eventually be displayed in the gallery through paging.  The one problem is that CountRows() can't be delegated so if its a large data source there is no way to get the total number of records.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Pstork1
Dual Super User
Dual Super User

Galleries are designed to be paged and load records 100 at a time.  So if you count the rows in a gallery you will always get the number of records that have currently been loaded through paging.  There is no way around that.  But you can do a CountRows() on the Data Source itself or whatever filtered set of Items is in the Items property of the Gallery.  That will give you the total number of records that will eventually be displayed in the gallery through paging.  The one problem is that CountRows() can't be delegated so if its a large data source there is no way to get the total number of records.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
v-albai-msft
Community Support
Community Support

Hi @DHAGZ ,

How are things going?

Has @Pstork1 's answer solved your question?

Best regards,

Allen

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,910)