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

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
Highlighted
Dual Super User III
Dual Super User III

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
Highlighted
Dual Super User III
Dual Super User III

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

Highlighted
Helper I
Helper I

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. 

Highlighted
Dual Super User III
Dual Super User III

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!

Highlighted
Helper I
Helper I

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
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,854)