web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Combine gallery pagina...
Power Apps
Answered

Combine gallery pagination and sortbycolumns

(0) ShareShare
ReportReport
Posted on by 545

Hello!

 

Wondering if someone can help me combine these two formulas please!

 

On the Item property of my Gallery:

I have this already (for pagination):

LastN(FirstN('Safety Information',varPage),RoundDown(Gallery2.Height / Gallery2.TemplateHeight,0))

 

And I want to filter the list using this:

SortByColumns(Filter('Safety Information', Status.Value = "Pending"),"Created",Ascending)

 

I have tried && and And(.... but neither work!  Both statements work great on their own but I really want to use both!

 

Any help greatly appreciated!

Categories:
I have the same question (0)
  • Verified answer
    cha_cha Profile Picture
    4,932 Moderator on at

    Hello @RMD211 

     

    How about 

    LastN(
    	FirstN(
    		Sort(
    			Filter('Safety Information', Status.Value = "Pending"),
    		Created)
    	'Safety Information',varPage)
    ,RoundDown(Gallery2.Height / Gallery2.TemplateHeight,0)
    )
  • RM-30040732-0 Profile Picture
    545 on at

    Worked a treat without the second 'Safety Information' reference!  Thanks so much!  I also added Filter('Safety Information', Status.Value = "Pending") to the other buttons that work on the pagination and works there too.

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard