cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Highlighted
Dual Super User II
Dual Super User II

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

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
Highlighted
Dual Super User II
Dual Super User II

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

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,208)