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 III
Dual Super User III

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 III
Dual Super User III

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

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,336)