cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bsimon
Level: Powered On

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
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
        )
)



Don't forget to 'Mark as Solution' if a post answered your question and always 'Thumbs Up' the posts you like or helped you!

View solution in original post

5 REPLIES 5
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.
Community Support Team
Community Support Team

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.
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
        )
)



Don't forget to 'Mark as Solution' if a post answered your question and always 'Thumbs Up' the posts you like or helped you!

View solution in original post

bsimon
Level: Powered On

Re: Delegation error

Thank you all for your prompt response.

Super User
Super User

Re: Delegation error

You're welcome, glad we could all help!




Don't forget to 'Mark as Solution' if a post answered your question and always 'Thumbs Up' the posts you like or helped you!

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,880)