cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
biancadevera
Helper IV
Helper IV

Match current user's email to a column in SharePoint list

I have created a list with the following columns:

  • Title: email address (Single text line)
  • Name: preferred name (Single text line)

I would like to match it with my User().Email. Is this possible?

 

Would like to filter my data based on the current user signed in (User().Email) with the data I have on my list. I've used the 'Created by'.Email = User().Email before but this will only work if it was created by a certain user.  

8 REPLIES 8
Pstork1
Dual Super User
Dual Super User

Use the following in the gallery items

Set(currentEmail, user().Email);
Filter(<<datasourcename>>, Title=currentEmail);


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

Hi @Pstork1 I had this error:

biancadevera_0-1637716001369.png

 

Put the Set() in the onVisible property for the screen.  



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

Tried to add the code in my Screen's OnVisible property: 

 

Set(currentEmail, user().Email);

 

No errors but results are not showing.

Did you check to see that the currentEmail variable was set after a run and what the value was?



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

@Pstork1 how can I check that?

After running the app in the Preview function of the editor check what is in the variables list.

image.png



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

Hi @Pstork1  just an update about this. I found a workaround for this issue. I created another column in my SP list and list down the email addresses. Was able to achieve my goal. Thanks for the help.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,437)