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 III
Dual Super User III

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 III
Dual Super User III

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (74,486)