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!

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,007)