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

How to resolve delegation warning message on PowerApps formula?

Hello,

 

I have delegation messages even after changing the limit from 500 to 2000 in experimental features, can you please help me with how can I avoid it ?

First Warning: Filter('dataSource', 'Created On' >= DateAdd(Today(), -3))

Error1.png

Second Warning:Filter('dataSource','Associated Column'.cr9fd_name = lbl.Text )

Error2.png

Third Warning: LookUp('dataSource',cr9fd_fullname = User().FullName).Project

Error3.png

Thank you for your time in advance! Best Regards,

1 ACCEPTED SOLUTION

Accepted Solutions

I could figure it out using this article in the following ways:

 

OnStart/OnVisible event of the screen, use collect functions to fetch records as a variable with the following syntax:

 

Collect(YourNewCollectionNameWithoutQuotes,DataSourceName)

 

Then, Use "YourNewCollectionNameWithoutQuotes" as datasource to operate on PowerApps control which would help to remove the delegation error message.

 

Thank you for addressing the root cause 🙂

 

Best Regards,

 

View solution in original post

6 REPLIES 6
v-yutliu-msft
Community Support
Community Support

Hi @dips23 ,

Could you tell me what’s your data source?

Firstly, non-delegable limits is not the reason why delegation warning appears. So, you can’t resolve it by changing non-delegable limits.

Delegation warning means that there’s some data that can’t be delegated to data source.

Secondly, as how to resolve the delegation warning, if your data source is non-delegable, it can’t be resolved directly.If the amount of your data source records is not more than 2000, please consider save your data source records into a Collection, then use the Collection as data source within your app instead of your original data source.

If your data source is delegatble, you could transfrom your formula to resolve it.

For more details about delegation, you could refer this:

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.

Thank you for your suggestions!

 

Data are coming from the CDS Entities + Office 365 Users connector and they are less than 2000:

 

I have tried earlier to search on "How to use 'Collect" on CDS datasource" or any data source, but most of the article returns defining and generating data runtime, while I need to run it against existing datasource.

 

Can you please share in that case, how to use "Collect" function to fetch data from existing datasource ? Exact syntax would be really helpful.

 

Thank you again!

 

Best Regards,

 

 

Hi @dips23 ,

Try this formula to save the data to a collection:

ClearCollect(collectionname,entityname)

Then, use the collection as the data source.

 

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.

Hello,

 

I have tried both the following ways, It returned me an error saying function ClearCollect has some invalid arguments:

 

ClearCollect('cdsEntity',"Items");

ClearCollect("Items",'cdsEntity');

 

Any clue ? 

 

Best Regards,

 

I could figure it out using this article in the following ways:

 

OnStart/OnVisible event of the screen, use collect functions to fetch records as a variable with the following syntax:

 

Collect(YourNewCollectionNameWithoutQuotes,DataSourceName)

 

Then, Use "YourNewCollectionNameWithoutQuotes" as datasource to operate on PowerApps control which would help to remove the delegation error message.

 

Thank you for addressing the root cause 🙂

 

Best Regards,

 

View solution in original post

mdevaney
Super User
Super User

@dips23 

There are 3 ways to use the SEARCH function without any delegation warning:

 

1. StartsWith Function
2. Search + Filter Function

3. Dataverse For Teams IN Operator

Check out this article for EXAMPLES:
https://matthewdevaney.com/power-apps-search-function-delegation-warning-workarounds

 

 

aaa.gif

 

 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,129)