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

Checking a users email against multiple emails from a Sharepoint List using an if statement? Is it possible?

Hi!

This is a re-post of a question I asked today where the post was immediately set as spam (???).

Not sure why it was set as spam! 

 

I've been researching into users and all the metadata that goes with it, and have come across a question for an idea I have, but don't know how to implement.

 

So, a user is logged into an app. Their email is test@email.com. I know this from User(). I have a sharepoint list of emails. 

 

I want to have a filtered gallery where the users email is checked against the sharepoints list of emails, and if true, show data, if not, show nothing. 

 

So if test@email.com was in the list, the user would gain access to view data in the gallery. If a users email was not in the list, they would not see the data. 

 

Sorry if it poorly explained!

Thanks in advance 

 
1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

Assuming the user is recorded in a person/group column and that the column isn't set to allow multiple users, then its a simple filter statement

Filter(SharePointlist,'personcolumn'.Email = currentuser)

make sure you save the user's email as a variable in the App OnStart or the Filter won't be delegable.

set(currentuser,User().Email)

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
Pstork1
Dual Super User
Dual Super User

Assuming the user is recorded in a person/group column and that the column isn't set to allow multiple users, then its a simple filter statement

Filter(SharePointlist,'personcolumn'.Email = currentuser)

make sure you save the user's email as a variable in the App OnStart or the Filter won't be delegable.

set(currentuser,User().Email)

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,753)