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

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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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