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 Apps
Answered

Gallery Items

(0) ShareShare
ReportReport
Posted on by 39
Hey everyone,

I have a sharepoint list with around 4700 items. I am using gallery in powerapps, that gallery uses a filter, there are approximately 700 items with that filter, but powerapps takes only 2000 rows from sharepoint and filters from them, is there any way to bypass it and get filtering from that 4700 items?
Categories:
I have the same question (0)
  • Suggested answer
    Fredrik_A Profile Picture
    3,644 Super User 2026 Season 1 on at
    Hello,
     
    you could put it all in a collection, for example:
     
    Concurrent(
        ClearCollect(
             colCarsChunk1,
             Sort('Car Inventory', ID, Ascending)
         ),
         ClearCollect(
             colCarsChunk2,
             Sort('Car Inventory', ID, Descending)
         )
    );
    ClearCollect(
        colCars,
        colCarsChunk1,
        Filter(colCarsChunk2, Not(ID in colCarsChunk1.ID))
    );
    Clear(colCarsChunk1);
    Clear(colCarsChunk2);
     
     
    The code above is from Matthewdevaney's blog, he has more good examples and alternative ways to do this. You can find it by searching for Create Power Apps Collections Over 2000 Rows With These 4 Tricks.
     
    If my response solved your issue, please mark it as ✅ Accepted Answer and give it a like.
     
     
     
  • RobElliott Profile Picture
    10,505 Super User 2026 Season 1 on at
    I used to create a collection of collections but but that meant I needed to keep track of how many list items there are and manually update the ClearCollect functions in OnStart. What I do now is slightly different. When an item is added to a list a flow in Power Automate gets the current max number from a column called Index and adds 1 to it and updates the list item. Then in my app, in the OnStart I create a collection using the For All and Sequence functions. The code below loops through the list for each batch of 2000 records (or less) and adds them to a collection. This method also removes delegation warnings. As you can see from the gallery items count there are 3138 items in the collection/gallery.
     
     
     
    Clear(colFinance);
    ForAll(Sequence(RoundUp(First(Sort('Project Financial Snapshot Report', Index, SortOrder.Descending)).Index / 2000, 0),1,1),
        With({firstID: (ThisRecord.Value-1)*2000, lastID: ThisRecord.Value*2000},
        Collect(colFinance, Filter('Project Financial Snapshot Report', Index>firstID && Index <=lastID))
    ));
     
    Rob
    Los Gallardos
    Principal Consultant, Power Platform, WSP Global (and classic 1967 Morris Traveller driver)
     
     
     
  • WarrenBelz Profile Picture
    155,444 Most Valuable Professional on at
    I may be misreading something here, but you are asking whether you can filter 4700 items down to 700. If the filter is Delegable, you can filter any number of items down to any smaller number, so the question is what is your filter ?
  • AD-15090620-0 Profile Picture
    39 on at
    @WarrenBelz @RobElliott @StretchFredrik

    Thank you for your responses, right now i have collection 'colgt', the filtering is from choice column - 'Ä®renginio statusas' with the choice 'Laisvas'. There are around 700 rows with the choice 'Laisvas". Would this work with this code? Or do i need to change and add extra filtering for that choice column? Right now i do not have time to try, i will try tomorrow, if you can help me with the code, i would be very thankful. 
     
    Concurrent(
        ClearCollect(
             colCarsChunk1,
             Sort('Car Inventory', ID, Ascending)
         ),
         ClearCollect(
             colCarsChunk2,
             Sort('Car Inventory', ID, Descending)
         )
    );
    ClearCollect(
        colCars,
        colCarsChunk1,
        Filter(colCarsChunk2, Not(ID in colCarsChunk1.ID))
    );
    Clear(colCarsChunk1);
    Clear(colCarsChunk2);
  • Michael E. Gernaey Profile Picture
    53,963 Moderator on at
     
    I think the issue is that the Gallery itself, is only pulling in 2,000 rows and therefor you do not believe your filter, which has only 700 out of the 4700 are being returned correctly, because you think that the Gallery is only allowing you to Filtering on its 2,000 rows, versus the BackEnd that has 4,700
     
    Is that correct? Which means, you think you are only going to get... for example 400 of the 700?
     
    So you want to make sure that the Filter you do, based on the Choice is going against all 4700, not the 2,000 you think the Gallery has?
     
    Is that accurate?
     
    Unless you are specifically running a filter on the gallery.allitems and allitems only has 2,000 (which should not be the case), then you should filter against the back end not the Allitems in the Gallery
     
    So I do not understand why there is a need to create multiple Collections etc.
     
    What I would ask really to you is, do you need your Gallery to pull in all 4700, or do you just need it to connect show the first 2,000 and then have people filter down to where it will NOT be over 2000 and it will be delegatable?
     
    Situational Awareness of need is important in these decisions.
     
     
     
    `
  • Suggested answer
    WarrenBelz Profile Picture
    155,444 Most Valuable Professional on at
    Assuming that is a single choice column, then yes - that filter is Delegable, so can be used directly on the Items of the Gallery - you do not need all of thoise collections.
    Filter(
       'Car Inventory',
       'Įrenginio statusas'.Value = "Laisvas"
    )
     
    Also if you want a collection getting a list up to 4,000 records, you can do it with one collection
    With(
       {
          _Asc,
          Sort(
             'Car Inventory',
             ID
          ),
          _Desc,
          Sort(
             'Car Inventory',
             ID,
             SortOrder.Descending
          )
       },
       ClearCollect(
          colMyCollection,
          _Asc,
          Filter(
             _Desc,
             !(ID in _Asc.ID)
          )
       )
    )
    I have a blog on bigger collections that be be useful to you.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful?
    Visit my blog
    Practical Power Apps    LinkedIn  
  • AD-15090620-0 Profile Picture
    39 on at
    @Michael E. Gernaey
    @WarrenBelz

    I am using additional filter comboboxes, so it shows delegation warning. only pulling 2000 rows from sharepoint. 
    So as Michael said, it is only about half of items that i need in the gallery, other half is missing because when i add text label to check rows it says 2000.

    So yeah, other 2700 rows from sharepoint is untouched.

    When i use additional filters than it shows Delegation warning
  • Verified answer
    WarrenBelz Profile Picture
    155,444 Most Valuable Professional on at
    That is why you need to post the full issue rather than let us try to guess it all. You can do this
    With(
       {
          _Data:
          Filter(
             'Car Inventory',
             'Įrenginio statusas'.Value = "Laisvas" &&
             OtherDelegableFiltersHere
          )
       },
       Filter(
          _Data,
          NonDelegableFiltersHere
       )
    )
    As long as the top Delegable filter set produces less than 2,000 records, the bottom filter is processed "locally" and not subject to Delegation - I have a blog on this that may be helpful to you.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful?
    Visit my blog
    Practical Power Apps    LinkedIn  

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 842

#2
Valantis Profile Picture

Valantis 563

#3
Haque Profile Picture

Haque 402

Last 30 days Overall leaderboard