Skip to main content
Community site session details

Community site session details

Session Id : ccc2MxTfRlzcSG9sRPMzlW
Power Apps - Building Power Apps
Unanswered

Gallery delegation issue

Like (0) ShareShare
ReportReport
Posted on 24 Jan 2021 17:55:59 by 725

Hi everyone

I have a gallery that has been filtered by a combobox, but I am getting a delegation warning because of the StartsWith. I was wondering how to get around this as I'm confident my Sharepoint database will exceed 2000 records over time.

Combobox (which gets it's data from a collection)

 

 

 

Sort(Distinct(Filter(IncompleteOrders,QuantityO<>QuantityRO),OrderNumO &" "& Title),Result,Ascending)

 

 

 

Gallery 

 

 

 

SortByColumns(Filter(Sent_Orders,StartsWith(OrderNumO &" "& Title, ComboBox6.Selected.Result)),"Title")

 

 

 

 

  • WarrenBelz Profile Picture
    149,102 Most Valuable Professional on 27 Jan 2021 at 21:19:34
    Re: Gallery delegation issue

    @Corissandageri ,

    I am not sure how that helps at all as I assumed the actual order number (in full) would be in the Combo Box selection anyway and it also does nothing to address the Delegation issue you are concerned about.

     

    Please click Accept as solution 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 giving it Thumbs Up.

  • R Bakker Profile Picture
    725 on 27 Jan 2021 at 18:47:04
    Re: Gallery delegation issue

    I don't know if this is the most elegant solution, but I made a label with a Default Left(ComboBox6.Selected.Result,5) to get the order number only from ComboBox6, and then filtered the gallery on that.

  • WarrenBelz Profile Picture
    149,102 Most Valuable Professional on 26 Jan 2021 at 21:36:38
    Re: Gallery delegation issue

    @Corissandageri ,

    Yes - Delegation is what it is - you may have already read this blog of mine, but you simply set it to 2,000 and manage what you can with Delegable filters. I have also just realised that using your filter <> (does not equal) is not Delegable either, so the With() statement here really does not help.

     

    Please click Accept as solution 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 giving it Thumbs Up.

  • R Bakker Profile Picture
    725 on 26 Jan 2021 at 17:49:16
    Re: Gallery delegation issue

    So my in my Sharepoint list I have exceeded 500 entries and if I leave my delegation limit to 500 then my latest entries don't show in my gallery. If I set the delegation limit to 2000, Will I not have the same problem later when my database exceeds 2000?

    Thank you for your time

  • WarrenBelz Profile Picture
    149,102 Most Valuable Professional on 26 Jan 2021 at 03:14:40
    Re: Gallery delegation issue

    @Corissandageri ,

    Why did you lower the Delegation limit?

    The With() Statement is still subject to the end result of the filter producing a data set of less than this number, so leave it as high as you need to for everything to work (2,000 will not hurt anything).

     

    Please click Accept as solution 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 giving it Thumbs Up.

  • R Bakker Profile Picture
    725 on 26 Jan 2021 at 01:12:37
    Re: Gallery delegation issue

    Hi Warren

    I was just reading your blog regarding the with function. The Combo box is working well. And the gallery worked too, but when I lowered the delegation limit, the gallery would no longer give results.

  • WarrenBelz Profile Picture
    149,102 Most Valuable Professional on 24 Jan 2021 at 20:04:38
    Re: Gallery delegation issue

    Hi @Corissandageri ,

    Firstly, Distinct is not Delegable either, so I have a suggestion for the first one

    With(
     {
     wQty:
     Filter(
     AddColumns(
     IncompleteOrders,
     "OrderNo",
     OrderNumO & " " & Title
     ),
     QuantityO<>QuantityRO
     )
     },
     Sort(
     Distinct(
     wQty,
     OrderNo
     ),
     Result,
     Ascending
     )
    )

    For the Gallery, try this 

    SortByColumns(
     Filter(
     AddColumns(
     Sent_Orders,
     "OrderNo",
     OrderNumO & " " & Title
     ),
     StartsWith(
     OrderNo, 
     ComboBox6.Selected.Result
     )
     ),
     "Title"
    )

     

    Please click Accept as solution 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 giving it Thumbs Up.

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473