web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / IF(IsBlank(); notify; ...
Power Apps
Answered

IF(IsBlank(); notify; patch

(0) ShareShare
ReportReport
Posted on by 27

Hello everyone,

 

I have a problem with my inventory app.

im using a button with this formula "If(IsBlank(Label1_4) = true; Notify("Error!";NotificationType.Error;2000);Patch(Table1;Defaults(Table1);{xxx})" and it works, but now i want present a success notification and reset the textinput fields after the register done and i cant!! why??

after patch function it doesnt acept any more conditions or formulas.

i tryed "And", "&&" and nothing works..

 

help???

Categories:
I have the same question (0)
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @sap334,

     

    Give the following code a try, adjust the names where necessary:

     

    If(
     IsBlank(Label1_4.Text); 
     Notify("Error!";NotificationType.Error;2000);
     Patch(
     Table1;
     Defaults(Table1);
     {xxx}
     );;
     Notify("Success!";NotificationType.Success;2000);;
     Reset(TextInputName) //Change to the correct text input control name
    )

     

    Changes:

    • Label1_4.Text this will reference the control text value
    • Added the success notification
    • Added a Reset() function

    Note: 1 semicolon is used to separate function parameters (true & false conditions If()), 2 semicolons are used to separate different functions (See Patch, Notify & Reset).

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

  • Verified answer
    mmollet Profile Picture
    3,187 on at

    Here is an example of how to do this using syntax from the US. Im not sure exactly how this will translate into your countries syntax as it seems you use ';' where I would use ','

     

    If(IsBlank(Label1_4), Notify("Error!, Texbox can't be blank", NotificationType.Error, 200), Patch(Table1, Defaults(Table1), {xxx}) ; Notify("Success! Data saved!", NotificationType.Success, 2000))

     

    Notice the ';' between the 2 different function calls that is in blue. This separates function calls and allows them both to be executed in the same 'if-true' part of the if statement. They are executed in succession.

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    @sap334,

     

    To add upon @mmollet comment. This is correct but depends on the syntax used.

     

    According to your code snippet it seems that you are using a European syntax variation, which is slightly different to the syntax most commonly seen on the Forum or on Guides.

     

    The difference is quite straightforward:

     

    Syntax 1: If(condition, true field, falseFunction1; falseFunction2) -> (Comma as a parameter separator, semicolon as a function separator)

    Syntax 2: If(condition; true field; falseFunction1;; falseFunction2) -> (1 semicolon as a parameter separator, 2 semicolons as a function separator)

     

    Syntax variant 1 will be most common online - when copying such code, just make sure to change the comma to a semicolon and 1 semicolon to 2. 😊

     

    I hope this helps!

  • sap334 Profile Picture
    27 on at

    thanks a lot everyone..

    in my region i have to use double semi colmas to separate functions... 😤

    got it know... thanks a lot...

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 414

#2
Valantis Profile Picture

Valantis 387

#3
timl Profile Picture

timl 344 Super User 2026 Season 1

Last 30 days Overall leaderboard