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

Filter Browse Gallery by current user email and gallery item

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

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filter Browse Gallery by current user email and gallery item

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"}) 

20190516UserGroupRelation.PNG

#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)

20190516FilterUserInGroup.PNG

 

If there is one better solution on your side,welcome to update here ASAP.

 

And there is one case for reference:

https://powerusers.microsoft.com/t5/General-Discussion/Filter-on-Outlook-groups-that-the-user-belong...

 

Hope this could be helpful.

 

Best Regards.

Yumia

 

 

1 REPLY 1
Community Support Team
Community Support Team

Re: Filter Browse Gallery by current user email and gallery item

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"}) 

20190516UserGroupRelation.PNG

#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)

20190516FilterUserInGroup.PNG

 

If there is one better solution on your side,welcome to update here ASAP.

 

And there is one case for reference:

https://powerusers.microsoft.com/t5/General-Discussion/Filter-on-Outlook-groups-that-the-user-belong...

 

Hope this could be helpful.

 

Best Regards.

Yumia

 

 

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 216 members 4,454 guests
Please welcome our newest community members: