cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Delegation Warning while filtering a Sharepoint list

Hi,

 

I am tired of the delegation warning appearing everywhere in my app where I am using the filter formula to filter my backend database located on Sharepoint. I read many threads about this issue being faced by other people but none of the solutions worked for me. I don't know what am I doing wrong. Attached is the screenshot for your reference.

 

Screenshot (393).png

 

Please help.

 

Aakash

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Hi @Pstork1 ,

 

I found the solution for all the 3 cases.

 

Case 1: The delegation warning was happening due to ambiguity in column name (both had value columns)

Case2: Filtering a table by a column from another table. (This works but has performance issues) 

Clear(Table3);
ForAll(Table1, Collect(Table3, Filter(Table2, ColumnA=Table1[@ColumnA])))

Case3: I just created a collection using the same filter formula. Then I did a sum on this collection.

ClearCollect(TotalHours,Filter(EffortHoursDatabase,ResourceName = ProfileDisplayName)); 
Sum(TotalHours,Hours)

 

Regards,

Aakash

View solution in original post

6 REPLIES 6
Pstork1
Dual Super User
Dual Super User

The problem is that you are using an embedded function in the filter statement.  Try changing your statement to something like this and see if that doesn't clear the warning.

set(ProfileDisplayName, Office365User.MyProfile().DisplayName);ClearCollect(MyRequests,Filter(TaskPlannerDatabase, RequestorName = ProfileDisplayName));


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365 and PWR EduCon in Chicago
EduCon Chicago 2022

Anonymous
Not applicable

Hi @Pstork1 ,

 

Thank you for your reply. Your solution worked like a charm. However, I am facing Delegation warnings in 3 more cases. Can you help me with that as well? With this, my app will be delegation warning free.

 

Case 1

Screenshot (394).png

 Case 2 (If I change it to TaskId = MyAssignmnets.TaskID, it says "Invalid Argument Type") - TaskId is a column

1.png

 Case 3

2.png

 Aakash

 

 

 



 

Case 1: Not '!' is non delegable.  Instead write it as ...Value = false.

Case 2: I don't have a way to solve this.  You are getting the error because ID is probably and Integer and 'in' is strictly a text search.  But 'in' is also non-delegable so it won't work anyway in terms of delegation.

Case 3: I can't really solve this one either.  Sum() is a non-delegable function.  Assuming the Filter() never returns more than 500 records, you can safely ignore the warning.  Otherwise the workaround is to pull the records into a collection using multiple filters that will get each dataset below 500 records then do the SUM() on the local collection

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365 and PWR EduCon in Chicago
EduCon Chicago 2022

Anonymous
Not applicable

Hi @Pstork1 ,

 

I found the solution for all the 3 cases.

 

Case 1: The delegation warning was happening due to ambiguity in column name (both had value columns)

Case2: Filtering a table by a column from another table. (This works but has performance issues) 

Clear(Table3);
ForAll(Table1, Collect(Table3, Filter(Table2, ColumnA=Table1[@ColumnA])))

Case3: I just created a collection using the same filter formula. Then I did a sum on this collection.

ClearCollect(TotalHours,Filter(EffortHoursDatabase,ResourceName = ProfileDisplayName)); 
Sum(TotalHours,Hours)

 

Regards,

Aakash

Aditya1105_0-1626166945018.png

Can anyone help me

Please post this as a new question rather than adding it as a reply to an old thread.  It won't really get the same exposure here.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365 and PWR EduCon in Chicago
EduCon Chicago 2022

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,451)