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

Delegation warning message cause by function in Items property

I get this message 

"Delegation warning. This part "Filter" of this formula might not work correctly on large data sets.

"The datasource might not be able to process the formula and might return incomplete dataset.

 

My items formula :

 

Filter('dbo].[VW_ACCOUNTS]' ,CN_Name=User().FullName)  

This formula works I think but Delegation warning is something I'll have to fix.

 

Please let me know how to fix this. Thanks

2 ACCEPTED SOLUTIONS

Accepted Solutions
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Delegation warning message cause by function in Items property

You should store the result of the User() function in a local variable. For example, if you have this expression in the OnVisible property of the first screen of your app:

Set(me, User())

Then you can use it in the filter expression:

Filter(
    'dbo].[VW_ACCOUNTS]',
    CN_Name = me.FullName) 

And the expression can then be delegated to the server. The original expression cannot be delegated because the server doesn't know what the User() function is (it's a function local to PowerApps), but when you replace it with a variable, it has a value that is sent as a constant to the server.

Craig77
Level: Powered On

Re: Delegation warning message cause by function in Items property

I aslo have this issue, please can you let me know how I acheive the below part.  My App consisits of one Screen which is One Form and One Data Table

 

You should store the result of the User() function in a local variable. For example, if you have this expression in the OnVisible property of the first screen of your app:

Set(me, User())

 

Delegation warning.JPGDel 2.JPG

 

 del vis.JPG

5 REPLIES 5
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Delegation warning message cause by function in Items property

You should store the result of the User() function in a local variable. For example, if you have this expression in the OnVisible property of the first screen of your app:

Set(me, User())

Then you can use it in the filter expression:

Filter(
    'dbo].[VW_ACCOUNTS]',
    CN_Name = me.FullName) 

And the expression can then be delegated to the server. The original expression cannot be delegated because the server doesn't know what the User() function is (it's a function local to PowerApps), but when you replace it with a variable, it has a value that is sent as a constant to the server.

ZachyV
Level: Powered On

Re: Delegation warning message cause by function in Items property

I placed the Set(me,User()) in the onVisible property and the triangle yellow with exclamation mark(Delegation warning!) didn't go away.

PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Delegation warning message cause by function in Items property

You also need to update the Filter expression to replace the User() with the new variable ('me')

Craig77
Level: Powered On

Re: Delegation warning message cause by function in Items property

I aslo have this issue, please can you let me know how I acheive the below part.  My App consisits of one Screen which is One Form and One Data Table

 

You should store the result of the User() function in a local variable. For example, if you have this expression in the OnVisible property of the first screen of your app:

Set(me, User())

 

Delegation warning.JPGDel 2.JPG

 

 del vis.JPG

Akishore
Level: Powered On

Re: Delegation warning message cause by function in Items property

I have a similar issue, Not sure how this needs to be fixed. My app works fine except for this part. Any thoughts on this will be higly appreciated.  

This is what I am currently using:

Filter('[dbo].[VendorExpenses]',TextInput3.Text in Month,TextInput4.Text in Year,TextInput1.Text in VendorKey,TextInput2.Text in VendorPaymentKey)

 

The error appears to be with the usage of "in". 

 

Error - Delegation warning 

 

Thanks in advance"

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 182 members 4,564 guests
Please welcome our newest community members: