cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jbjb247
Helper II
Helper II

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

View solution in original post

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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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