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

Delegation error

I have resolved quite a few delegation errors but this one I can't seem to figure out.

The items property in my gallery is:

 Search(
         Filter('Exception Tracker',SPOC = Me),
	TextInput1.Text,"SPOC")

Me is set on OnStart of the app as 

 

Set (Me,Office365Users.MyProfile().MailNickname)

SPOC is a text comun in my SP list.

 

Any help will be appreciated.

 

9 REPLIES 9
MRNBagtas
Level: Powered On

Re: Delegation error

Hi, @AJ13 !

 

Have you tried using "in" instead of "="?

Filter('Exception Tracker',Me in SPOC)

 Let me know how it goes. 

 

Hope this helps! 🙂  

AJ13
Level: Powered On

Re: Delegation error

Hi @MRNBagtas ,

 

That didn't work. 

Initially the delegation error was in TextInput1.Text,"SPOC".

 

With  "in" the delegation error is on the "in" word.

Mickyw
Level 8

Re: Delegation error

Did you create index for column SPOC?

Regards,

Mick

MRNBagtas
Level: Powered On

Re: Delegation error

Hi, @AJ13 !


I actually did the same scenario you have, but instead of an SP list, I used collection.

It worked fine for me using your PowerApps code without any delegation error. 

 

 

AJ13
Level: Powered On

Re: Delegation error

@Mickyw  I did, but still the error.

Mickyw
Level 8

Re: Delegation error

Hi @AJ13 

 

I've just noticed that your delegation warning was underlining TextInput1.Text,"SPOC". In that case it refers to "Search" function (not Filter one) - which can not be delegated to Sharepoint list.

If your Filter is selective enough to never returns more then 2000 records - then you can save it temporarily to collection and search over it using Search.

Regards,

Mick

 

AJ13
Level: Powered On

Re: Delegation error

Hi @Mickyw ,

 

Thank you for that explanation. But I never faced this issue in my previous apps. While I used the same format 

for e.g. This one from one of the other apps works just fine.

SortByColumns(
    Search(
                 Filter(
                'Incident Tracker',
                Vertical = UsrVertical,
                Action_x0020_Plan_x0020_Status = "Incident Logged" 
            ),
        TextInput1.Text,
        "Impacted_x0020_Client"
    ),
    "Incident_x0020_Id",
    Descending
)

I started my current app with a replication of the same code, just changing the variable names but landed in error. SInce then I have been stripping down the code, removed sort, but no luck.

AJ13
Level: Powered On

Re: Delegation error

This is where I am in my current app. Delegation error still on search on the OHR field.

ortByColumns(
    Search(
    Filter('Exception Tracker',SPOC=Me),
    TextInput1.Text,"OHR"),
    "Date_x0020_of_x0020_Movement",Descending)

Any other ideas? My record count is expected to be more than 2000.

Mickyw
Level 8

Re: Delegation error

I agree this is mysterious how delegation warning is calculated. I have a impression it it sometimes false-positive.

For example this gives me delegation warning (SP list has only single text column)

Collect(
    testcol1;
    Search(
    Filter(
        delegation_test;
        Title = "2019-01-01"
    );
    "2019";
    "Title"
))

while this does not (find the difference 😉 😞

Collect(
    testcol1;
    Search(
    Filter(
        delegation_test;
        Title = "2019-01-01"
    ).Title;
    "2019";
    "Title"
))

 

In such and simillar cases it should help if you collect data from Filter into temporary collection and then search it in second call.

Regards,
Mick

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