Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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!
  • NR-02100941-0 Profile Picture
    10 on at
    If form is blank when 'submitting' notify the empty form
    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
  • Suggested answer
    MooseBot88 Profile Picture
    144 on at
    If form is blank when 'submitting' notify the empty form
    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
    If form is blank when 'submitting' notify the empty form
    bump on this because it's still allowing me to 'login' despite the field being blank.
     
    Thanks all again
  • scalca Profile Picture
    243 Super User 2025 Season 1 on at
    If form is blank when 'submitting' notify the empty form
    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
    If form is blank when 'submitting' notify the empty form
    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.
     
  • Nandit Profile Picture
    1,563 Super User 2025 Season 1 on at
    If form is blank when 'submitting' notify the empty form
     
    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!

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard