Skip to main content

Notifications

Power Platform Community / Forums / Building Power Apps / If form is blank when ...
Building Power Apps
Unanswered

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

Posted on by 6
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!
  • scalca Profile Picture
    scalca 139 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
    NR-02100941-0 6 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
    Nandit 752 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

September 2024 Newsletter…

September 2024 Community Newsletter…

Community Update Sept 16…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 141,122

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,414

Leaderboard