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 / How to display default...
Power Apps
Answered

How to display default error message for a required field when blank or less than required # characters

(0) ShareShare
ReportReport
Posted on by 5

I am trying to get a required field to show the default error message (No data Error pic) when the following conditions are met 1) text field is blank, IsBlank(DataCardValue#) =True and  2) the length of the text has to equal nine (9) characters. Len(DataCardValue#)<=8  This is what I have so far....

BoarderColor = If(IsBlank(Parent.Error) or Len(Datacardvalue#)<=8, Parent.BorderColor,Color.Red) 

 

Any suggestions?

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @jimc001 ,

    You can set the Text of the Error message to this

    If(
     !IsBlank(DataCardValue#.Text) && Len(DataCardValue#.Text) <> 9,
     "9 Characters must be entered",
     ""
    )

    also set the DelayOutput of the Text box to true

     

    Please click Accept as solution 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 giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • jimc001 Profile Picture
    5 on at

    Thank you, that got me pointed in the right direction, in the end my fix was,  

    If(

        Len(DataCardValue27.Text) < 9 && IsEmpty(DataCardValue27.Text),

        "9 digits must be entered",Parent.Error

    )

     

    The change to IsEmpty cleared out the error message when the 9 digit was entered.

     

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard