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 / If form is blank when ...
Power Apps
Suggested Answer

If form is blank when 'submitting' notify the empty form

(1) ShareShare
ReportReport
Posted on by 10
Hello everyone!
My first of many questions while I learn the language and commands.
 
I'm ace at excel which is helping but leaves me stumped at certain times.
Below is the command I have on a 'Login' button, but even when the 'OpName' has text in, the form won't navigate and keeps displaying the notification:
 
 
 
If(!IsBlank('OpName'),Notify("Please enter your name"),Navigate('Home screen',ScreenTransition.Fade) )
 
 
 
Thanks very much in advance all!
Categories:
I have the same question (0)
  • Nandit Profile Picture
    1,568 Moderator on at
     
    I think you wish to notify the user with "Please enter your name" message when the text is blank, right?
     
    Your condition in the code says -
    if the OpName is not Blank, Notify, otherwise Navigate
     
    It should be-
    if the OpName is Blank, Notify, otherwise Navigate
     
    Update the code to this:
    If(IsBlank('OpName'),Notify("Please enter your name"),Navigate('Home screen',ScreenTransition.Fade) )
    
     
    Hope this helps. 
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
  • NR-02100941-0 Profile Picture
    10 on at
    So If i understand correctly, '!' negates the argument?
     
    Class.
     
    On the back of that, I can now 'login' with the form OpName being blank. I'll dig deeper, certainly something simple no doubt.
     
  • scalca Profile Picture
    243 Moderator on at
    one option is to disable the login button while OpName is blank 
    on DisplayMode of Login button you can add
    If(IsBlank('OpName'), DisplayMode.Disabled, DisplayMode.Edit)
     
  • NR-02100941-0 Profile Picture
    10 on at
    bump on this because it's still allowing me to 'login' despite the field being blank.
     
    Thanks all again
  • Suggested answer
    MooseBot88 Profile Picture
    168 on at
    If the 'OPName' is a text input you would have to specify that it's text is empty... so use code like this
     
    If(IsBlank('OpName'.text),Notify("Please enter your name"),Navigate('Home screen',ScreenTransition.Fade) )
     
     
  • NR-02100941-0 Profile Picture
    10 on at
    it didn't like the ".text" on the end there.
    It is a text input field also.
     
    if I change the isblank to reference the form instead of the text box, it still won't work hmmmmm

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard