You are currently viewing How to use PowerApps notify function?
PowerApps notify function

How to use PowerApps notify function?

In this post, we’ll discuss the PowerApps Notify function and how to use the PowerApps to notify function to display notifications in PowerApps such as success message, warning message, error message, information message, and so on.

What is PowerApps notify function?

How do I notify PowerApps? , everyone asked himself: how do I show errors in PowerApps? or how do I notify PowerApps? the answer to these questions is using the Power Apps Notify function that displays a banner message “a notification message ” to the user at the top of the screen.

Note: The character limit for Notify function is 500 characters.

and the powerapps notify position is at at the top of the screen.

PowerApps notify duration

  • The default time of PowerApps notify function is 10 seconds.
  • The notification will remain until the user close it, or another notification replaces it, or the timeout expires which defaults to 10 seconds.

PowerApps Notify Function Syntax

Notify( Message [, NotificationType [ , Timeout ] ] )

The Notify function takes these arguments:

  • Message – Required and it is a Message to display to the user at the top of the screen.
  • NotificationType – Optional. Type of the message and there are Different Types of NotificationType in Power Apps Notify Function, there are four different types of PowerApps Notification type arguments that you can use with the notify function ,it can be one of the following types:
    1. NotificationType.Error that displays the message as an error.
    2. NotificationType.Information (The Default Message if you don’t specify the type) and it displays the message as informational.
    3. NotificationType.Success that displays the message as success.
    4. NotificationType.Warning that displays the message as a warning.
  • Timeout it is Optional argument that represent the number of milliseconds to wait before automatically dismissing “disappering” the notification message.
    • The default is 10 seconds (or 10,000 milliseconds).
    • The notification will be displayed indefinitely with a Timeout of 0 this mean that the notification will only be dismissed by the user.
    • You can increase the PowerApps notify time by increasing the Timout argument.

Note: if the user will not specify the second argument, then by default, it will take as an informational message.

Power Apps Notify Auto Close

When a user wants to disappear the notification message automatically from the PowerApps screen, so you have to provide a Timer value in Milliseconds in the formula as the third parameter of the PowerApps Notify Function.

Note: if you will not provide any timer to the Notify function in the Outtime parameter, then by default, it will take 10 seconds

PowerApps Notify Color

Depending on the type of notification messages, the Notify function changes the specific color and icon for the displayed message panner. That means,

  • If you are displaying a success message, then it will show the green color with a success icon on the Powerapps screen.
  • If you are displaying an error message, then it will show the red color with an error icon on the Powerapps screen.
  • If you are displaying a warning message, then it will show the yellow color with a warning icon on the Powerapps screen.
  • If you are displaying an information message, then it will show the gray color with an invormation icon on the Powerapps screen.

PowerApps notify success message

You can use the PowerApps notify function to display a success message to the user to help him make sure that he is on the right way of using the app functionality. You will use the NotificationType.Success that displays the message as success with green color panner message.

PowerApps notify function
PowerApps notify success message

Syntax:

 Notify( Message , NotificationType.Success, Timeout)

Example:

I have a SharePoint list for employees and I want to submit a record to this list, when the record is submitted successfully, it will show the user a success message in green color that the record saved correctly. So let’s know how the PowerApps onsave notify function work?

If(SubmitForm(Form2),Notify("The record saved correctly",NotificationType.Success,0))
  • Message  : “The record saved correctly” that will display to the user when the record is submitted successfully.
  • NotificationType.Success = It is the notification type that will display a successful message.
  • Timeout: 0 that represent when powerapps notify disappear, so the success notification message will appear on the Powerapps screen until the user close it.
n2 | Power Platform Geeks
PowerApps notify function: notify success message

PowerApps notify error message

You can use the PowerApps notify function to display an error message to the user when errors occur on the screen while he worked on the app.

You will use the NotificationType.Error that displays the message as an error with red color panner message.

n4 | Power Platform Geeks
PowerApps notify error message

Syntax:

 Notify( Message , NotificationType.Error, Timeout)

Example:

I have a SharePoint list for employees and I want to submit a record to this list, when the record is submitted successfully, it will show the user a success message in green color that the record saved correctly otherwise it will show an error message to the user that the record not saved correctly. “PowerApps on failure notify

If(SubmitForm(Form2),Notify("The record saved correctly",NotificationType.Success,0),Notify("the recored not saved correctly",NotificationType.Error,0))
  • Message  : “the recored not saved correctly” that will display to the user when the record isn’t submitted successfully.
  • NotificationType.Error= It is the notification type that will display an error message.
  • Timeout: 0 that represent when powerapps notify disappear, so the error notification message will appear on the Powerapps screen until the user close it.
PowerApps notify error message
PowerApps notify error message

When you will Preview your app and Submit the record without writing anything in the Title textbox that is required, an error message will show to the user.

n4 | Power Platform Geeks
PowerApps notify error message

PowerApps notify on field change: PowerApps notify warning

You can use the PowerApps notify function to display a warning message to the user when you want to warn them of something wrong he did while working on the app, for example, if he writes less than 10 digit in the mobile text box you will send warning message that the mobile number must be 10 digits. you can perform this function on the OnChange property of the textbox as we will do in this example.

You will use the NotificationType.Warning that displays the message as a warning with a yellow color panner message, as shown below.

n5 | Power Platform Geeks

Syntax:

Notify(Message ,NotificationType.Warning,Timeout)

Example:

Notify the user with a warning message if he wrote less than 10 digits in the mobile field.

If(Len(DataCardValue9.Text)<10,Notify("the mobile should be 10 digits",NotificationType.Warning,8000))

Message: “the mobile should be 10 digits” that will display to the user when the user enters <10 digits in the mobile textbox.
NotificationType.Warning= It is the notification type that will display a warning message.
Timeout:8000 represents when PowerApps notify disappear, so the warning notification message will appear on the Powerapps until 8000 milliseconds, so the PowerApps notify time here is 8000 milliseconds.

PowerApps notify on field change
PowerApps notify function: warning message

PowerApps notify Information message

You can use the PowerApps notify function to display an error message to the user when errors occur on the screen while he worked on the app.

You will use the NotificationType.Error that displays the message as an error with red color panner message.

n8 1 | Power Platform Geeks
PowerApps notify error message

Syntax:

 Notify( Message , NotificationType.Information, Timeout)

Example:

I have a SharePoint list for employees I will notify the user that he must save his password, to use later.

Notify("you must keep the password",NotificationType.Information,0)
  • Message  : “you must keep the password” that will display to the user OnChange property of the password textbox.
  • NotificationType.Information= It is the notification type that will display an information message.
  • Timeout: 0 that represent when powerapps notify disappear, so the error notification message will appear on the Powerapps screen until the user close it.
n7png | Power Platform Geeks
PowerApps notify information message

When you will Preview your app and writing something on the password textbox and move to another control it will show you an informational message to inform you to save your password somewhere.

n8 | Power Platform Geeks
PowerApps notify Information message

Conclusion

In this PowerApps tutorial, we explain what is the PowerApps notify function and :

  • How PowerApps notify warning?
  • How PowerApps notify success message?
  • How PowerApps notify Error?
  • How PowerApps notify on field change?
  • When PowerApps notify disappear?
  • How to change the PowerApps notify timer?
  • PowerApps onfailure notify
  • PowerApps onsave notify
See Also
Join us
Need Help
  • Have a related question? Please ask it at deBUG.to Community.

Heba Kamal

Microsoft MVP, MCT, Technical Speaker, Blogger, and Microsoft 365 and Power Platform Consultant.