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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Is Visible property do...
Power Apps
Suggested Answer

Is Visible property does not work with regex

(1) ShareShare
ReportReport
Posted on by 82
I'm trying to use the following to control the visibility of a text warning: 
 
!IsMatch(Self.Text, "^\d+(\.\d{1,2})?$") && !IsBlank(Self.Text)
When text is entered in a (text) Data Card, I want to enforce exactly 0.00, 00.00, or 000.00. For example, only the following examples can be entered: 
  • 1.23
  • 12.34
  • 123.45
 
With the above expression set for the label visible property, I can enter: 
  • 1
  • 1.2
  • 1.23
  • 12.34
  • 123.45
  • 12.3
  • 123.4
The label visibility does not trigger, which is the opposite of what I need. 
 
The visibility does trigger when I enter
  • 1.234
 
It also does not trigger when blank. 
 
What am I missing? I need specific and exact behavior: number of decimals must always be 2, even if it's "1.00" and it must not be blank. No, I cannot use a number input for this card. I'm trying to keep this simple with a warning label with a visibility property. 
 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    Without getting into the Regex part, you need Or || instead of And && here
    !IsMatch(Self.Text, "^\d+(\.\d{1,2})?$") || !IsBlank(Self.Text)
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  
  • Chriddle Profile Picture
    8,708 Super User 2026 Season 1 on at
    @WarrenBelz This is always true:
    !IsMatch(Self.Text, "^\d+(\.\d{1,2})?$") || !IsBlank(Self.Text)
     
    The OP's logic looks fine, it's the RegEx.
    Although the following looks clearer to me:
    Not(IsBlank(TextInput1.Text) || IsMatch(TextInput1.Text, "\d{1,3}\.\d{2}"))
     
     
  • Suggested answer
    WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    Must not have had my glasses on - missed the ! . . . I got it working with this
    Len(Self.Text) > 0 && !IsMatch(Self.Text,"^\d+\.\d{1,2}$")
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  
  • WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥
    Visit my blog
    Practical Power Apps    LinkedIn   

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard