cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sharuk
Helper V
Helper V

Pagination in Gallery

Hi

I'm trying to achieve pagination inside gallery. and I'm following this video https://www.youtube.com/watch?v=aKsNOsGj72A by @RezaDorrani.

 

I'm having a data source with 2000 records. and when I tried to run, the countrows(gal_hidden) is showing 100 records only but I'm not able to navigate to next page as shown below

Sharuk_0-1622475825438.png

 

and then I've opened the hidden gallery and scrolled down till 400 items then I tried running it again then now I'm able to see upto 400 records and again I'm not able to click on next

Sharuk_1-1622475938029.png

 

do we need to scroll down the hidden gallery till end to load all the items like this ? @RezaDorrani  can you please help me out here!

 

 

5 REPLIES 5
Pstork1
Dual Super User
Dual Super User

Review the last 2 minutes of the video.  That is where @RezaDorrani covers how to scroll the hidden gallery to get the next 100 records by selecting the last record in the hidden gallery.  The formula is at 18:56 in the video.



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

Thanks @Pstork1 , I missed it. but after applying that formula, I've observed strange behavior as it is showing 100 series after 500 series as shown below. I think it shouldn't be the behavior. Am I doing anything wrong here ?

Sharuk_0-1622478451314.png

 

That all depends on how the data source you are loading into the gallery is sorted.  If its not sorted by the series number then seeing them out of order is perfectly normal.



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

Hi @Pstork1 , But I'm able to see the same records in 11th page as well. is there a chance which we get the records again in another chance ? and I'm not using any sort

Sharuk_1-1622480094671.png]

 

 

Even if you aren't using a sort in Power Apps, there is some kind of a default sort.  But if you are seeing the same records again then something about your paging isn't setup correctly.  Make sure you look at the way the last set of records when paging are accessed.  That may be where the duplicates are coming from.



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

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,223)