cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Email Address Verification using a list

Hi, 

 

I am trying to make a button visible only if the User().Email is matching with atleast one of the email addresses in my Sharepoint List Column called EAddress.

 

Please help me on this. Thanks 

9 REPLIES 9
Highlighted
Super User II
Super User II

Re: Email Address Verification using a list

Try adding this to the visible property of the button.

 

!IsEmpty(Lookup('SPList', User().Email = EAddress))

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Email Address Verification using a list

Hi Jeff, 

 

Thank you for the immediate response. Please find the attached

 

 

 

 

Highlighted
Super User III
Super User III

Re: Email Address Verification using a list

@Suresh1409 

Add a .Email to your formula.  

!IsEmpty(Lookup('SJA Coating Adviser Responsible', User().Email = EAddress.Email))

 

This is assuming you have created your column EAddress as a Person column.  If that is not the case, then reply back.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Frequent Visitor

Re: Email Address Verification using a list

Hi Randy, 

 

It worked out but I have given a different logic as below.

MailAdd - Single Text containing email address

usermailvar - variable set for user().email

 

!IsEmpty(LookUp('SJA Coating Adviser Responsible', MailAdd=usermailvar))

 

It shows up for my id now but i need to test with other users. when i try to remove my email from the list, the visibility is still ON. Not sure whether its a powerapps slowness to capture the update from sharepoint.

Highlighted
Dual Super User II
Dual Super User II

Re: Email Address Verification using a list

Inorder for PowerApps to refelxt your latest update from SharePoint, you would have to Refresh your data source using the Refresh function or just re start the App which reloads all your collections
Highlighted
Frequent Visitor

Re: Email Address Verification using a list

Hi Reza, 

 

I have tried that but in vain 

 

Regards

Suresh

Highlighted
Super User III
Super User III

Re: Email Address Verification using a list

@Suresh1409 

I'm not sure what you mean by you need to test with other users.

Even if you change the email address in your SharePoint list, that is not going to impact your App because it is still verifying against your email address.  

If you want to test with other users, then you need to change your usermailvar to be the email addres of the other user...not your SharePoint list, as that condition will never happen.


Now, with that in mind - you might also want to change your formula to the following:

   !IsBlank(Lookup('SJA Coating Adviser Responsible', MailAdd=usermailvar).ID)

IsEmpty will always return false, even if it doesn't exist.  With IsBlank, you are (in this formula) checking a specific column (ID) for blank.  If it's not found, then it will be blank and your formula will work.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Frequent Visitor

Re: Email Address Verification using a list

Hi Randy, 

 

The below code worked. However, when i add one more email address with a separator as semicolon in the list column, it seems there is a problem in looking up. Let me try again.

 

!IsBlank(LookUp('SJA Coating Adviser Responsible',MailAdd=usermailvar).MailAdd)

Highlighted
Super User III
Super User III

Re: Email Address Verification using a list

@Suresh1409 

Yes, it's not going to do anything with that semicolon except be part of the original text field.  Your formula will not work on that scenario.

In this case your logic will need to change.  Originally it was thought that you had a list of items with an email address in it that would determine (if the email was in the list) that the button should be visible.

But, now you are indicating that the list may have multiple emails in each record.

So, the question would be, what is the record that has the information to determine this?

 

Are you trying to make the button visible on a record item (i.e. in a gallery) or is the button particular to the app in general.  

In other words - if you are dealing with the button on a record by record basis, then your logic for determining the email address would be based on the EAddress field of the record.

If you are dealing with many records and you are trying to determine if a person is in the EAdress field...the question is - of what record?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

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 designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,883)