web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Comparing or evaluatin...
Power Apps
Unanswered

Comparing or evaluating a string

(0) ShareShare
ReportReport
Posted on by 20

Hey everyone, I've searched but can't seem to find anything like this but I'm sure someone may have come done something similar.

 

In my canvas-app I need to be able to evaluate the logged in users email to ensure it follows the standard naming convention. I know I can get the users email with User().Email however this is where I get stuck.

I need to be able to evaluate that email follows the pattern of firstname.lastname@domain.com and isn't one that follows lastname-cloud-test@domain.com 

 

So is there a way to assess/evaluate the email to determine if follows one of these patterns? for example I know if it contains "-cloud-test@" then its a testing account and not their main account. I feel the answer is right in front of me but for some reason just can't see it... yay dyslexia!

 

Thanks for any and all advice/guidance/help.

Pete

Categories:
I have the same question (0)
  • PMatwyuk Profile Picture
    20 on at

    I haven't tried this yet but would IsMatch(User().Email, "-cloud-test", Contains) be what I'm looking for?

  • Verified answer
    David Jennaway Profile Picture
    716 on at

    Yes, IsMatch is what you want, though I'd suggest you also use IgnoreCase, as by default it is case-sensitive, so:

    IsMatch(User().Email, "-cloud-test@", Contains & IgnoreCase)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard