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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,327)