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
Super User
Super User

Re: Display custom text if field is blank

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
Super User
Super User

Re: Display custom text if field is blank

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. Smiley Happy 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
10 REPLIES 10
Super User
Super User

Re: Display custom text if field is blank

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
Super User
Super User

Re: Display custom text if field is blank

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

Anandavadivelan
Level: Powered On

Re: Display custom text if field is blank

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

Super User
Super User

Re: Display custom text if field is blank

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. Smiley Happy 

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
Anandavadivelan
Level: Powered On

Re: Display custom text if field is blank

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

Anonymous
Not applicable

Re: Display custom text if field is blank

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!

Super User
Super User

Re: Display custom text if field is blank

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

Re: Display custom text if field is blank

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.

 

 

 

 

Super User
Super User

Re: Display custom text if field is blank

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. Smiley Happy 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