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

Avoid delegation when checking user email in multi person SharePoint column

I am trying to filter some records from a SharePoint list when my email exists in a mutli-select person column. Here is my existing code

Set(myEmail, User().Email);
Filter(SPList, myEmail in AssignedTo.Email)

However, the above code is giving a delegation warning. I have read that "in" is delegatable in SharePoint. Can anyone help me remove the delegation warning? My dataset could gradually grow more than 2000 records at some point so avoiding Collections.

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Avoid delegation when checking user email in multi person SharePoint column

Hi @sharepointguy 

 

Can you try to update the expression to:
Set(myEmail, User().Email);
Filter(AddColumns(SPList,Concat(AssignedTo,Email,";")), myEmail in CustomCol)

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

Re: Avoid delegation when checking user email in multi person SharePoint column

Hi @sharepointguy 

 

Can you try to update the expression to:
Set(myEmail, User().Email);
Filter(AddColumns(SPList,Concat(AssignedTo,Email,";")), myEmail in CustomCol)

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

sharepointguy
Level: Powered On

Re: Avoid delegation when checking user email in multi person SharePoint column

Hi @yashag2255 ,

 

Thanks for your response. After posting the question, I modified my list to add another text column named as AssignedToEmails which is populated with the AssignedTo emails separated by ";". I tried using 

 

Set(myEmail, User().Email);
Filter(SPList, myEmail in AssignedToEmail)

 

But the delegation warning still persists. 

Dual Super User
Dual Super User

Re: Avoid delegation when checking user email in multi person SharePoint column

Hey @sharepointguy 

 

The issue here is "in" operator is not delegable, so if you will use it directly this will give you the error.

Have you tried the code I shared? As part of that expression, we are also creating a column for reference in the Filter.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

sharepointguy
Level: Powered On

Re: Avoid delegation when checking user email in multi person SharePoint column

Hi @yashag2255 ,

 

The code worked like a charm. Thanks for the reply.

Helpful resources

Announcements
thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

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