Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Filter a table by multiple users



I currently have an app that is filtered by user, most of them are directors or managers. Now, I have been asked, to find a way for their assistants to be able to see what their director or manager sees on the app. Is there maybe a formula that could check the user email against one column (DirectorEmail) if not match, then check another column (AssistantEmail)? 

Community Support Team
Community Support Team

Re: Filter a table by multiple users

Hi @KReyes,


Do you want the Dirctor User can see Director Email Column and Assistant User can only see Assistant Email in the App? Or the Director User can see both?

What data source do you use?

I test by SP as data source and use if  function to achieve what you described the requirements.


I think you can try the following workaround.

I test as Next:

Data Source:20190205FilterByUserEmai( My SP list name)


App Test:


Add one Gallery, and its layout is Title,Subtile,Body.

Subtitle6.Visible: If(User().Email in '20190205FilterByUserEmail'.DirectorEmail,true,false)    (can only see DirectorEmail)

Body3.Visible: If(User().Email in '20190205FilterByUserEmail'.AssistantEmail,true,false)       (can only see AssistantEmail)


Body3.Visible: If(User().Email in '20190205FilterByUserEmail'.DirectorEmail,true,If(User().Email in '20190205FilterByUserEmail'.AssistantEmail,true,false))  (Director can see both Email Columns)



Hope this can be helpful.

Best Regards.



Level 8

Re: Filter a table by multiple users


This result may be achieved with a nested If statement. Assuming you are using a SQL table to store credentials. The Context Variable, AllowAccess, is one way to signal the program that the user is authorized.


If(!IsBlank, Lookup(dbo.MasterTable, DirectorEmail=User().Email), UpdateContext({AllowAccess:true}), If(!IsBlank, Lookup(dbo.MasterTable, AssistantEmail=User().Email), UpdateContext({AllowAccess:true}), UpdateContext({AllowAccess:false})))

Helpful resources


Watch Sessions On Demand!

Continue your learning in our online communities.


PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Power Platform World Tour

Coming to a city near you


PowerApps Community User Group Member Badge

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


Join PowerApps User Group!!

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


Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!


Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 28 members 3,863 guests
Please welcome our newest community members: