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

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 III
Helper III

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 III
Helper III

@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 III
Helper III

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

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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