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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,905)