In my PowerApp screen, I have a Gallery which is connected to a Task List in my SharePoint site. The AssignedTo column is multi select allowing Users and Groups.
I am trying to fetch all items which either are assigned directly to me or to a AD security group where I am a member of. The below code will not work if I am not directly part of the AssignedTo column
Filter(MyTaskList, User().Email in AssignedTo.Email)
Any help would be appreciated
Solved! Go to Solution.
Hi @sharepointguy ,
Currently I don't find one directly formula expreesion to achieve that.
And there is one alternative method,firstly you need to build the current user and the Group's relation list and then filter.
I test as next,
Button.OnSelect=ClearCollect(UserGroup,{User:User().Email,Group:"My Group Name"})
#Of cource you can use other ways to build their relation list, can be one SP list or excel and so on.
And then in the Gallery Items:
Filter('20190516FilterCurrentUser', "My Group Name" in 'Assigned To'.DisplayName||User().Email in 'Assigned To'.Email) #('20190516FilterCurrentUser' is my SP Task list Name, you can change to yours on your side)
If there is one better solution on your side,welcome to update here ASAP.
And there is one case for reference:
Hope this could be helpful.
Best Regards.
Yumia
Hi @sharepointguy ,
Currently I don't find one directly formula expreesion to achieve that.
And there is one alternative method,firstly you need to build the current user and the Group's relation list and then filter.
I test as next,
Button.OnSelect=ClearCollect(UserGroup,{User:User().Email,Group:"My Group Name"})
#Of cource you can use other ways to build their relation list, can be one SP list or excel and so on.
And then in the Gallery Items:
Filter('20190516FilterCurrentUser', "My Group Name" in 'Assigned To'.DisplayName||User().Email in 'Assigned To'.Email) #('20190516FilterCurrentUser' is my SP Task list Name, you can change to yours on your side)
If there is one better solution on your side,welcome to update here ASAP.
And there is one case for reference:
Hope this could be helpful.
Best Regards.
Yumia