cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Case sensitivity issue in an IF statement

I'm trying to get a Visible to function properly.

Label 2 is the persons email address, pulled with User().Email

I require the user to input their email address into DataCardValue28 and it to match their User().Email address, if it does, it makes a button visible to them.  

Visible is:
If(DataCardValue28.Text = Label2.Text,true,false)

This works perfectly when it's exactly the same.

The workaround that I needs, is to lose the case sensitivity as if someone types in John.Smith@abc.com instead of their User().Email john.smith@abc.com its not coming back as a match even though it would be fine for what's needed.  

Any help much appreciated 🙂

Thank you 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
PowerAddict
Super User
Super User

Hi,

Try:

If(Lower(DataCardValue28.Text) = Lower(Label2.Text),true,false)

This should convert both emails to lower case (you could use Upper too to convert both to upper case) and the result willbe a match irrespective of the case in which the email was entered by the user.

Let me know if this works.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

View solution in original post

3 REPLIES 3
PowerAddict
Super User
Super User

Hi,

Try:

If(Lower(DataCardValue28.Text) = Lower(Label2.Text),true,false)

This should convert both emails to lower case (you could use Upper too to convert both to upper case) and the result willbe a match irrespective of the case in which the email was entered by the user.

Let me know if this works.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com
Anonymous
Not applicable

You superstar!  Worked perfectly!

 

Thank you 🙂

Glad I could help! Good luck with the rest of your app! Feel free to reach out in case of any questions!

Thanks,
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

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.

Users online (2,956)