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

Delegation error

Hi All,

I have a gallery that reads from a SP list. I am using the sort command below on the galleries items property 

The SP list has only 80 items in it. I am having an issue with this line using the app checker

 

TextSearchBox1.Text in Title I have also tried using Text(title). Title is is the name of the SP column

 

Any suggestions ? Thanks

 

Sort
(If
(IsBlank(TextSearchBox1.Text), 'Software Catalog',Filter('Software Catalog', TextSearchBox1.Text in Title) ),
Title,
If(SortDescending1,
SortOrder.Descending,
SortOrder.Ascending)
)

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Delegation error

Agree with what @RandyHayes wrote here - its a warning and if you don't foresee hitting 2000+ items then I would leave the formula as-is and mark his solution as the answer.

 

If you do think you will end up with over 2000 items, then you could change your 'in' to a StartsWith - which is not as flexible but it will allow you to delegate the search 🙂

 

Sort(
        If(
            IsBlank(TextSearchBox1.Text),
                'Software Catalog',
                Filter('Software Catalog', StartsWith(Title, TextSearchBox1.Text)
        ),
        Title,
        If(
           SortDescending1,
           SortOrder.Descending,
           SortOrder.Ascending
        )
)

@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

5 REPLIES 5
Highlighted
Super User
Super User

Re: Delegation error

@bsimon 

The In operator is not delegable, so you will see a warning message for that.

It should ONLY be a warning.  This is not an error in your formula.

It is telling you that if your datasource grows beyond the maximum number of records allowed (500 by default, expandable to 2000), then you might get incomplete results.

If your list is only 80 items and you do not expect it to grow beyond 2000, then you can ignore this warning.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Community Support
Community Support

Re: Delegation error

Hi @bsimon ,

Delegation is just a warning not error.

Since your items number is smaller than 2000, you do not need to worry about it.

Only if your record is larger than 2000, the delegation warning means that your app may not perform well.

The appearence of delegation warning is because that you use undelegable functions.

I suggest you change your non-delegable limit to 2000, then there's no need to worry about delegation warning when your record is smaller than 2000.

File->App settings->Advanced settings7124.PNG

What's more, here's a doc about deleagtion for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Super User
Super User

Re: Delegation error

Agree with what @RandyHayes wrote here - its a warning and if you don't foresee hitting 2000+ items then I would leave the formula as-is and mark his solution as the answer.

 

If you do think you will end up with over 2000 items, then you could change your 'in' to a StartsWith - which is not as flexible but it will allow you to delegate the search 🙂

 

Sort(
        If(
            IsBlank(TextSearchBox1.Text),
                'Software Catalog',
                Filter('Software Catalog', StartsWith(Title, TextSearchBox1.Text)
        ),
        Title,
        If(
           SortDescending1,
           SortOrder.Descending,
           SortOrder.Ascending
        )
)

@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

Highlighted
Helper I
Helper I

Re: Delegation error

Thank you all for your prompt response.

Highlighted
Super User
Super User

Re: Delegation error

You're welcome, glad we could all help!


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,092)