web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to Validate User E...
Power Apps
Unanswered

How to Validate User Email Address Against Approver Email Address

(0) ShareShare
ReportReport
Posted on by 8

Hi Guys,

 

I have a PowerApps Form which I want to create so that user's can apply for access to a certain app.

 

In the form I have the Officer Email Address of the User in a User().Email Function and an Authorising Email Address which is free text that the User can enter. I want there to be a check that the User cannot just enter their own email address.

 

So I was thinking if there was a function that I could add that if these columns match an Error can pop up?

 

I've tried a few things, however getting an error - not sure if this is because the format of both columns are different?

 

Thanks in Advance.

Categories:
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Try this

    If( User().Email = TextInput1.Text; DONT SEND EMAIL; Send Email)

     

    TextInput1 is the textinput where users write approval email

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

  • EdNash Profile Picture
    8 on at

    Hi @Nogueira1306 

     

    I have tried using your above solution and have added in Notify("Declined",NotificationType.Error),SubmitForm (SubmitFormRequest)); instead of Dont/Send Email

     

    I'm still getting an error and the Issue appears to be Incompatible types for comparison

     

    IF(USer().Email = AuthoriserEmail_DataCard1.Text, Notify("Declined",NotificationType.Error),SubmitForm(SubmitRequestForm))

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Show me the error, please

  • v-albai-msft Profile Picture
    Microsoft Employee on at

    Hi @EdNash ,

    Seems you are using a wrong control name in your formula.

    I did a test, set OnChange property of my TextInput control to below, and everything works fine:

    If(User().Email=DataCardValue6.Text,Notify("Declined",NotificationType.Error),SubmitForm(Form3))

    So on your side, try to set below formula on the OnChange property of your Textinput control(don't use the DataCard name, expand the AuthoriserEmail_DataCard1, and you can find the Textinput control name. The control name should format like DataCardValueX, see my screenshot😞

    If(User().Email = DataCardValueX.Text, Notify("Declined",NotificationType.Error),SubmitForm(SubmitRequestForm))

    valbaimsft_2-1629353330415.png

    Best regards,

    Allen

  • EdNash Profile Picture
    8 on at

    Hi Allen,

     

    I think I am almost there, I have a Submit Button so don't think I need a SubmitForm on the end of the formula for this DataCard as this already exists on the Submit Button.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard