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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter gallery by last...
Power Apps
Answered

Filter gallery by last 15 entries

(0) ShareShare
ReportReport
Posted on by 407

I have a gallery with the datasource set to Sharepoint. I am also filtering by user and selected admin. This is the syntax i have in the Items, it works fine.

If(User().Email in varAdminEmail, KBXoffline, Filter(KBXoffline, 'Created By'.Email = User().Email))

I want to also show only the last 15 entries.  I have tried using LastN(KBXoffline, 15), which works when put in Items by itself, however i can not seem to be able to add it to the existing syntax.

If(User().Email in varAdminEmail, KBXoffline, Filter(KBXoffline, 'Created By'.Email = User().Email));
LastN(KBXoffline, 15)

 

Can anyone please assist,

 

KR's,

Matt383

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at

    @Matt383 

    Here’s the code you should add to filter on the 1st 15 entries.

    FirstN(Sort(If(User().Email in varAdminEmail, KBXoffline, Filter(KBXoffline, 'Created By'.Email = User().Email)), Created, Descending), 15)

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Matt383 Profile Picture
    407 on at

    Thanks Mdevaney,

     

    Thats what i was looking for 

     

    Matt383

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard