web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Check if the login use...
Power Apps
Unanswered

Check if the login user email is inside a SharePoint People/Group column which allow multiple selection

(0) ShareShare
ReportReport
Posted on by 3,506

We have a list named Task, with these fields:-

 

- Title

- PeopleWork

 

Where the PeopleWork field is of type People/Group which allow multiple selection, as follow:-

 

johnjohn123_0-1649988875261.png

 

 

Now inside our Canvas app >> i added a gallery >> and i want the gallery to only show the items where the login user is defined inside the PeopleWork field, as follow:-

 

johnjohn123_1-1649989031677.png

 

the formula worked since i only have few items, but as shown in the picture it is raising a delegation warning. so is there a way to fix this formula to remove the delegation warning ? i am open to any option even changing the SharePoint Fields' types or even redesign the whole list.

 

Thanks

 

 

 

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @johnjohn123 

    The "in" operator is not delegatable in PowerApps. Create a contacts table for users and include email as one of the fields. It can have a one to many relationship to the tasks table.

  • Ashwin7104 Profile Picture
    671 on at
  • johnjohn123 Profile Picture
    3,506 on at

    @Drrickryp so how i need t store the relation between the new list and the Task list? using a text field on the new list which store the task id for example?

  • johnjohn123 Profile Picture
    3,506 on at

    @Ashwin7104 thanks , but the link you posted will use this formual:-

     

    Finally "Filter('Support List',User_Email in Reviewer.Email)" works for me. 

    which is not delegable and we will face the same issue

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @johnjohn123 

    Yes, exactly so but it would be a number type in the employee table not text. If the relationship is many to many, ie employees can be assigned to many tasks, then a junction table will be necessary. Such a table would consist of the IDs from the task table and the employee table. How you design it depends on whether you will want to see a list of tasks by employee in addition to a list of employees by task.

  • johnjohn123 Profile Picture
    3,506 on at

    @Drrickryp Ok now i did this modifications to the SharePoint lists, now i have 2 lists instead of one:-

     

    1) Task list .. with only the Title + ID

    2) PeopleWork list with ID + TaskID + a single selection people/group field named People

     

     

    So now i tried to create a demo gallery which should only show the Tasks where the user is assigned to. so on the Screen OnVisible i build this collection to get the PeopleWork items which have the login user email:-

     

    ClearCollect(relatedtasks,Filter(PeopleWork,People.Email=User().Email))

     

     

    then on the Items property of the gallery i define this formula:-

    johnjohn123_0-1650029273411.png

     

     

    but i also got a delegation warning... so i am again into the same problem? am i doing things correctly?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @johnjohn123 

    Use "=" instead of "in". The latter is not delegatable.  For more information regarding keys, relationships and how to implement them in PowerApps, see my blog post here https://powerusers.microsoft.com/t5/Power-Apps-Community-Blog/Relational-Database-Principles-and-PowerApps-Step-3-Keys-and/ba-p/188640  as well as the one following it. https://powerusers.microsoft.com/t5/PowerApps-Community-Blog/Relational-Database-Design-fundamentals-Implementing-a-One-to/ba-p/200521 

    Finally, my suggestion is to never use People, Lookup and Choice type columns in SharePoint, just single line of text, Numbers and date/time type columns, see #1 in https://powerusers.microsoft.com/t5/Power-Apps-Community-Blog/The-Ten-Commandments-of-SharePoint-in-PowerApps/ba-p/848842?search-action-id=151860118609&search-result-uid=848842 

  • johnjohn123 Profile Picture
    3,506 on at

    @Drrickryp but storing the user email as a single line of text, will cause issue , if the user email is updated later on inside AD.. now since i am using people/group which does not allow multiple selection,, so i can not see any issue inside power apps am i correct?

     

    Second point; if i use = instead of in i will get an error "incompatible type..", as follow:-

     

    johnjohn123_0-1650042447520.png

     

  • johnjohn123 Profile Picture
    3,506 on at

    @Drrickryp are you able to advice on my latest email ? thanks

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @johnjohn123 

    With regard to the incompatible error, you need to use Lookup not Filter. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard