Power Apps Notify() function [How to use with examples]

This Power Apps tutorial will run you through a few examples of how to use the Notify() function in Power Apps based on various conditions.

While working with the Power Apps canvas app, I was required to notify messages using the Power Apps Notify() function.

By using PowerApps we can build Apps easily and we will see here how to use PowerApps notify function to display alerts and notifications in the Apps.

We will also go over how to use the Power Apps notify() function with the following items:

  • What is Power Apps notify function?
  • What is the Power Apps notify formula or syntax?
  • What are the types of the Power Apps notify function?
  • Give an example of the Power Apps notify.
  • How to change the font size of the Power Apps notify?
  • What is the Power Apps notify timeout?
  • Is it possible to change the Power Apps notify position?
  • What is the Power Apps notify duration?
  • How to auto close the Power Apps notify?
  • Work with the Power Apps notify color?
  • How to display the date and time using the Power Apps notify?
  • How to use line break within the Power Apps notify?
  • How to notify after the Power Apps form submit?
  • How to Power Apps notify after the patch?

PowerApps notify function

What is PowerApps notify function? PowerApps Notify is a function we can use to show an alert message on top of the PowerApps screen. We can display notifications like Error, Information, Success, and Warning.

While working with the Power Apps canvas app, we can find a notify() that is used to display a banner message at the top of the screen to the user.

The notification will be displayed until the user disregards it, another notification replaces it, or the timeout, which is set to 10 seconds by default, expires. Also, it allows the user to increase the notification time out within the notify function.

The Notify function has a character limit of 500 characters.

The Notify function in PowerApps always returns true. Previously, the Notify function was called ShowError, and it only displayed error messages.

Read Power Apps Filter With Date Picker

Power Apps notify formula

The syntax or formula for the Power Apps notify function is below:

Notify(text, notification_type, timeout)

Where,

  • text: Required. The text or message is to be displayed to the user at the top of the screen.
  • notification_type: Optional. It allows the user to choose the type of message to display. The default notification type is NotificationType.Information.
  • timeout: Optional. It specifies the period of time to wait before the notification message is automatically deleted. The time is expressed as a number of milliseconds.

The timer is set to 10 seconds or 10,000 milliseconds by default. The message will be removed from the Powerapps screen after 10 seconds. The notification message will be displayed indefinitely if the Timeout is set to “0.”

Read How To Set Default Date in Power Apps Date Picker

Power Apps notify types

There are 4 different kinds of notification types available under the Power Apps notify() function.

Below are the types of notifications or alerts we can show in the Power Apps App.

NotificationType ArgumentDescription
NotificationType.ErrorDisplays the message as an error.
NotificationType.Information (Default)Displays the message as informational.
NotificationType.SuccessDisplays the message as success.
NotificationType.WarningDisplays the message as a warning.

There are:

1. NotificationType.Error

This notification argument indicates the displayed message is an error message. The notification will appear in a red color having a cross symbol.

To display an error notification, insert the below expression on a button control’s OnSelect property.

OnSelect = Notify("This is an error notification", NotificationType.Error)
Power Apps notify types
Power Apps notify types

While previewing the app, it will display an error notification at the top of the screen shown below.

Power Apps notify error message
Power Apps notify error message

This is how an error notification appears on the screen using the Power Apps notify function.

2. Power Apps notify warning

This notification argument indicates that the displayed message is a warning. The notification will appear in a light-orange color having a warning symbol.

To display a warning notification, insert the below expression on a button control’s OnSelect property.

OnSelect = Notify("This is a warning notification", NotificationType.Warning)
Power Apps notify warning
Power Apps notify warning

While previewing the app, a warning notification will appear at the top of the screen as shown below.

PowerApps notify warning
PowerApps notify warning

Using the Power Apps notify function, this is how a warning notification appears on the screen.

3. Power Apps notify success

This notification argument indicates that the message is a successful notification. The notification will appear in a light green color having a tick symbol.

To display a success notification, insert the below expression on a button control’s OnSelect property.

OnSelect = Notify("This is a success notification",NotificationType.Success)
Power Apps notify success
Power Apps notify success

While previewing the app, a success notification will appear at the top of the screen, as shown below.

PowerApps notify success
PowerApps notify success

This is how a success notification appears on the screen when using the Power Apps notify function.

4. Power Apps notify information

This default argument indicates that the displayed message is an informational notification. That is, if the user does not specify the second argument, it will default to an informational message.

The notification will appear in a light gray color having an information symbol. To display a default or information notification, insert the below expression on a button control’s OnSelect property.

OnSelect = Notify("This is a Information notification", NotificationType.Information)
Power Apps notify information
Power Apps notify information

An information notification will appear at the top of the screen while previewing the app, as shown below.

PowerApps notify information
PowerApps notify information

Using the Power Apps notify function, this is This notification argument indicates that the message is a success notification.

Read Build an app in Power Apps

Power Apps notify example

Here we will see an example of Power Apps notify function using a button control. When the user clicks on the button, it will notify the user by displaying an error message at the top of the screen.

To work with this, the following steps are:

  • On the Power Apps screen, add a button control (under the Insert tab).
  • Rename the button control. (Ex- Show Notification).
  • Insert the below expression on the OnSelect property of the button control.
OnSelect = Notify("You clicked on the button", NotificationType.Error, 1000)
Example of Power Apps notify
Example of Power Apps notify

Here the timeout is 1000 which indicates 1000 milliseconds = 1 second. That means the notification will disappear after 1 second.

Now, save and publish the app. Preview the app and click on the button control to see the result.

PowerApps notify example
PowerApps notify example

We can also change the notification type to information, warning, or success. This is an example of the Power Apps notification function.

Read How to disable Power Apps date picker

Power Apps notify font size

Here we will see how to work with the font size while working with the Power Apps notify function.

The default size in the PowerApps Notify function is a little small. However, when a notification appears at the top of the screen, we may need to increase the font size.

Unfortunately, there is no direct way or property available within the Power Apps to customize the font size of this notification. Finally, we can do this using our current Web Browser or Mobile Device.

Case-1: By web browser’s setting

If you want to increase the size of the Notify function font, change the Font Size settings in your Web Browser or Mobile Device as shown in the screenshot below.

Power Apps notify font size
Power Apps notify font size

Case-2: Using HTML tag in notify()

There is another way to modify the text size while working with the notify() within the Power Apps.

That means we can use the HTML heading tag to increase or decrease the notification inside the Power Apps notify function.

To work with this, we are going to use the above example of the button control and insert the below expression on the button’s OnSelect property.

OnSelect = Notify("<h1> This is a success notification </h1>", NotificationType.Error)
Make the text bigger when using Power Apps Notify function
Make the text bigger when using Power Apps Notify function

Let’s check the app, and when we click the button, we can see that the notification message is larger than the default font size.

PowerApps notify function custom font size
PowerApps notify function custom font size

This is how to customize the font size while using the Power Apps notify function.

Read How to Patch Power Apps Date Picker

Power Apps notify timeout

There is a timeout property in Power Apps notify() that specifies the time period. Once the time is out, the notification message will disappear. In this section, we will see how to work with the Power Apps notify timeout.

We will build an app where we will add a button control. So that when the user click on the button, an information message will notify the user at the top of the screen for the 5 seconds. After 5 seconds the message will disappear automatically.

To work with this, the following steps are:

  • On the Power Apps screen, add a button control.
  • Insert the below expression on the button’s OnSelect property.
OnSelect = Notify("The notification will disappear in 5 seconds", NotificationType.Information, 5000)
Power Apps notify timeout
Power Apps notify timeout
  • Also, add a timer control to the screen which will display the time.
  • Set the duration for 5000 i.e., 5000 milliseconds = 5 Seconds.
PowerApps notify timeout
PowerApps notify timeout

Let’s preview the app. Click on the button to display the notification and click on the timer control. We can see once the 5 seconds is over, the information notification will disappear below:

Timeout in Power Apps notify
Timeout in Power Apps notify

On the first screen, the message is clearly visible for 5 seconds; on the second screen, the message fades slowly once the timer expires. This is how the timeout works within the Power Apps notify().

Power Apps notify position

Do you want to change the position of the notification that appears when you use Power Apps notify? Unfortunately, Microsoft Power Apps does not allow you to change the position of the notification. It is only visible at the top of the screen.

Power Apps notify duration

Here, we will discuss the Power Apps notify duration. The duration property is similar to the timeout property in that it indicates the notification’s display time period.

  • The PowerApps notify function has a default time of 10 seconds.
  • The notification will be displayed until the user closes it, another notification replaces it, or the timeout, which is set to 10 seconds, expires.

Power Apps notify color

Let’s discuss the different types of colors that come up while working with the Power Apps notify function.

  • Green: When displaying a success message or NotificationType is set to “success“, the notification will be green.
  • Red: When displaying an error message or NotificationType is set to “error“, the notification will be red.
  • Orange: When displaying a warning message or NotificationType is set to “Warning“, the notification will be orange.
  • Gray: When displaying an informative message or NotificationType is set to “Information“, the notification will be gray.

Read How to Reset Power Apps Date Picker

Power Apps notify auto close or disappear

If at certain times we want the notification message to disappear automatically from the PowerApps screen, we can include a timer value (in milliseconds) as the third optional parameter of the PowerApps notify formula.

Even so, if we do not provide a timer option or timeout value to the formula, by default, it will take 10 seconds and then disappear from the screen.

Suppose, there is an expression using notify() below:

OnSelect = Notify("Please insert the correct password", NotificationType.Warning, 1000)

Where 1000 indicates the value for the timer or timeout i.e., 1000 milliseconds. That is, the warning notification will be closed automatically after 1 second.

This is how to work with the Power Apps notify auto close.

Power Apps notify date time

In this section, we will look at whether it is possible to display the date and time while working with the Power Apps notification.

To work with this, the following steps are:

  • Add a button control to the screen.
  • Insert the below expression on the button’s OnSelect property.
OnSelect = Notify("Your last click was "& Now(), NotificationType.Information)
Power Apps notify Datetime
Power Apps notify Datetime

Let’s play the app. We can see, once the button is clicked, both the date and time will display below:

Power Apps notify with time
Power Apps notify with time

This is how to display the Power Apps notify with date and time.

Read Power Apps Checkbox control within Gallery

Power Apps notify line break

Here, we will see how to work with the Power Apps notify using line break. That is, we will use multiline or line break to display the notification message. Instead of a single line, the message will be displayed in a multi-line format.

To work with this scenario, we are going to use the above example that is displaying the date and time notification in a single line.

Insert the below expression on the button’s OnSelect property.

OnSelect = Notify("Your last click was <br>" & Now(), NotificationType.Information)
PowerApps notify line break
PowerApps notify line break

That’s it! When we click on the button, we can see the notification appears as multi-line statements:

Power Apps notify line break
Power Apps notify line break

This is how to dispaly the notification using the Power Apps notify line break.

Power Apps submit form and notify

Within the Power Apps, we will see how to display a notification once the form is successfully submitted. As per our most recent client’s request, once the form is submitted, a successful message will appear to notify the user of the successful submission.

For this, the following steps are:

  • Suppose, we have a SharePoint list named Employees having some columns such as Employee Name, Department, JoinDate.
Power Apps submit form and notify
Power Apps submit form and notify
  • Build a Power Apps edit form using the above SharePoint list. Also, add a button to submit the form.
PowerApps submit form and notify
PowerApps submit form and notify
  • Insert the below expression on the button’s OnSelect property to submit the form as well as dispaly a new form after the submission.
OnSelect = SubmitForm(Form1); NewForm(Form1)
Power Apps Show success message after submission
Power Apps Show success message after submission
  • To display the success message, insert the below expression on the form’s OnSuccess property.
OnSuccess =
 Notify("Your form has been submitted successfully!", NotificationType.Success)
Power Apps Show success message after submit
Power Apps Show success message after submit

That’s all. Let’s fill up the form and click on the submit button.

PowerApps notify success message after form submit
PowerApps notify success message after the form submit

We can see the item that saved on the SharePoint list below:

Power Apps submit form and notify success message
Power Apps submit form and notify success message

This is how to notify a success message after the form submission within the Power Apps.

Read How to use Power Apps Check Box Control

Power Apps notify after patch

Here, we will see how to notify a message to the user after the patch. That means, the user will get an instant successful notification, once the item is patched to the specific data source.

Suppose, we have a SharePoint list named Projects having some columns such as Title, Start date, and Delivery date.

Power Apps notify after patch
Power Apps notify after patch
  • We’ve added one text input control and two Power Apps date picker controls to the Power Apps screen to insert the title, start date, and delivery date, respectively.
PowerApps notify message after patch
PowerApps notify message after patch
  • Add a button control to the screen and insert the below expression on the button’s OnSelect property to patch the data as well as notify the user.
OnSelect = Patch(Projects, Defaults(Projects), {Title: Title_txt.Text, StartDate: DeliveryDatePicker.SelectedDate, DeliveryDate: StartDatePicker.SelectedDate}); Notify("Your request has been submitted!", NotificationType.Success);
Power Apps notify a success message after the patch
Power Apps notify a success message after the patch

Let’s save the app. Insert the data inside the controls and click on the patch button. We can see, we will notify a successful message once the item is patched shown below:

Power Apps notify a success message after patch
Power Apps notify a success message after patch

This is how to notify the user of a success message after the patch within the Power Apps.

You may like the following PowerApps tutorials:

In this tutorial, we learned how to display alerts and notifications in Power Apps. Also, we discussed, how to use the PowerApps Notify function with examples.

From this Power Apps tutorial, we discussed how to notify the user using the Power Apps notify() function based on different scenarios such as:

  1. Power Apps notify function
  2. Power Apps notify formula
  3. Power Apps notify types
  4. Power Apps notify example
  5. Power Apps notify font size
  6. Power Apps notify timeout
  7. Power Apps notify position
  8. Power Apps notify duration
  9. Power Apps notify auto close
  10. Power Apps notify the color
  11. Power Apps notify time
  12. Power Apps notify line break
  13. Power Apps submit a form and notify
  14. Power Apps notify after the patch
  • Same here. I tried to format notification text using html tags and it does not work.
    Do we need to enable any setting?

  • >