cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Doors1980
Helper I
Helper I

Restrict number of items in Gallery

I've got a pretty standard formula on the item of a Gallery:

 

SortByColumns(Filter(LLL, StartsWith(Title, TextSearchBox1.Text)), "Modified", If(SortDescending1, Ascending, Descending))

 

How would I modify this formula to further restrict the filtered results to only return a set amount of items from my SharePoint list? Say 100 items?

 

Cheers in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
CarlosFigueira
Power Apps
Power Apps

You can use the FirstN function for that:

FirstN(
    SortByColumns(
        Filter(
            LLL,
            StartsWith(Title, TextSearchBox1.Text)),
        "Modified",
        If(SortDescending1, Ascending, Descending)),
    100)

View solution in original post

4 REPLIES 4
CarlosFigueira
Power Apps
Power Apps

You can use the FirstN function for that:

FirstN(
    SortByColumns(
        Filter(
            LLL,
            StartsWith(Title, TextSearchBox1.Text)),
        "Modified",
        If(SortDescending1, Ascending, Descending)),
    100)

View solution in original post

You are the man @CarlosFigueira Nice one.

Can this technique  be used to retrieve data from a Large Sharepoint lists?

 

See https://powerusers.microsoft.com/t5/PowerApps-Forum/Help-with-Large-Sharepoint-List/m-p/66007#M27107

 

Thank you!

It should work; if all the functions that you use for filtering and sorting are delegatable (if they're not, there will be a blue icon indicating it), then it should work.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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
Top Kudoed Authors
Users online (3,321)