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 / Limit records shown in...
Power Apps
Answered

Limit records shown in a gallery

(0) ShareShare
ReportReport
Posted on by 240

Hello,

 

I would like to add a filter to set a limit of the number of records that are displayed in my gallery.

 

For example only to show the 100 most recent items added would be great to do (anything older than this i dont think people would need to see within the gallery anymore or a toggle button to then show everything not just 100 most recent).

 

I currently have this filter within a search box on items property of gallery:

 

Sort(
If(
IsBlank(CaptureSearch_inp.Text),
Payroll,
Filter(
Payroll,
(CaptureSearch_inp.Text in 'Ignore if mass issue -->') ||
(CaptureSearch_inp.Text in 'Ignore if mass issue -->2') ||
(CaptureSearch_inp.Text in 'SAP or Workday') ||
(CaptureSearch_inp.Text in 'Closest main cause (list can be refined - add to notes)') ||
(CaptureSearch_inp.Text in 'Correct but unclear = where pay was correct but not understood and you see an improvement opportunity. ') ||
(CaptureSearch_inp.Text in 'If we might need to discuss the prevention idea') ||
(CaptureSearch_inp.Text in 'If we might need to discuss the prevention idea3') ||
CaptureSearch_inp.Text in 'If large numbers impacted enter on one line and add volume here'
)
),
'Month found',
Descending
)

 

Is this possible and if so how would I go about doing this?

 

Many thanks
Chris

Categories:
  • Akser Profile Picture
    1,546 Moderator on at

    Hi @Appy1,

     

    FirstN should do the trick for you - FirstN(Table, 100) would give you the first 100 records.

     

  • CC-19121430-0 Profile Picture
    240 on at

    Thanks @Akser  - I am not familiar with FirstN where would i add this?

  • Verified answer
    Akser Profile Picture
    1,546 Moderator on at

     

    FirstN(
    Sort(
    Filter(
    Payroll,
    IsBlank(CaptureSearch_inp.Text) ||
    (CaptureSearch_inp.Text in 'Ignore if mass issue -->') ||
    (CaptureSearch_inp.Text in 'Ignore if mass issue -->2') ||
    (CaptureSearch_inp.Text in 'SAP or Workday') ||
    (CaptureSearch_inp.Text in 'Closest main cause (list can be refined - add to notes)') ||
    (CaptureSearch_inp.Text in 'Correct but unclear = where pay was correct but not understood and you see an improvement opportunity. ') ||
    (CaptureSearch_inp.Text in 'If we might need to discuss the prevention idea') ||
    (CaptureSearch_inp.Text in 'If we might need to discuss the prevention idea3') ||
    CaptureSearch_inp.Text in 'If large numbers impacted enter on one line and add volume here'
    )
    ,
    'Month found',
    Descending
    ), 100)

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard