Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Gallery delegation issue

(0) ShareShare
ReportReport
Posted on 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
    146,524 Most Valuable Professional on at
    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 at
    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
    146,524 Most Valuable Professional on at
    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 at
    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
    146,524 Most Valuable Professional on at
    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 at
    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
    146,524 Most Valuable Professional on at
    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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard