cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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

Highlighted

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
Highlighted
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

Highlighted

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

Highlighted

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

Highlighted

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
Highlighted

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

Highlighted
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!

Highlighted

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
Highlighted
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.

 

 

 

 

Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (13,445)