cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Display custom text if field is blank

Hello everyone,

 

I am having trouble configuring custom text to display if a field is left blank.

 

I've tried several variations of:

If(Parent.Error="Input number.","Please enter....","")

If(IsBlank(Parent.Error); ""; "Your custom error message")

 

But so far I haven't had any success. All I'm trying to do is basically display "Input number" if a field is left blank and the form is submitted. I realize this probably isn't super difficult, but try as I might, I haven't been able to figure it out.

 

Thanks in advance for your help! Please let me know if more details are required.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Shanescows
Super User
Super User

How about something more like:

 

Visible = If(IsBlank(InputNumberField.Text), "false", "true")

 

I covered it in this video Conditional Formatting in PowerApps.

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

View solution in original post

Sorry, I was out all afternoon. Can I recommend you do it slightly different? Leave the submit button disabled until the form is filled out. 🙂 I think this video on PowerApps conditional formatting should be exactly what you are looking for. If not happy to help more.

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

View solution in original post

13 REPLIES 13
Shanescows
Super User
Super User

How about something more like:

 

Visible = If(IsBlank(InputNumberField.Text), "false", "true")

 

I covered it in this video Conditional Formatting in PowerApps.

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

View solution in original post

If you are working with a text input box, the simplest approach is to use the Hint Text property.  

Thank you Shane, and you could do this also if it’s a gallery in place of the text field?

Sure. A gallery doesn't show up when it is blank and it also has a Visible property. 

 

This video covers a lot of these concepts. Conditional formatting in PowerApps. Maybe give it a watch, give it a try, and let us know if you get stuck. Everything you want to do seems to be there. 🙂 

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

Thanks Shane,  I already subscribe and follow your videos, will check this video. great work by the way!

Anonymous
Not applicable

Hi @Shanescows,

 

Thanks for the input! I'm still a bit confused as to how what you suggested will allow me to change the text that is displayed on error. Am I missing something? 

 

Thanks so much!

Hi Neal - Let's see if we can make sure you get this figured out.

 

Maybe I misunderstood? I thought your goal was to show a message that says something like "This isn't a valid email address, please try again" or "Name is a required field". Is that your goal? 

 

 

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training
Anonymous
Not applicable

Hi Shane,

 

First, thank you so much for taking the time to get back to me on this and for your help in figuring this out. I really do appreciate it!

 

My goal is to display the error message, "Input number" if a field is left blank and someone tries to submit the form. Currently, the default error message is displayed, and I can't figure out how to change it to what I want.

 

 

 

 

Sorry, I was out all afternoon. Can I recommend you do it slightly different? Leave the submit button disabled until the form is filled out. 🙂 I think this video on PowerApps conditional formatting should be exactly what you are looking for. If not happy to help more.

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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