In Focus

How To Show A Message In PowerApps

In this blog, we will see how to notify users with various types of messages on the screen in PowerApps.

If you are using PowerApps native apps or SharePoint customized forms with PowerApps, then you might have come across a situation where you want to notify the user about various things happening or that have happened behind the UI. So, in this blog, we will see how to notify a user on the screen in PowerApps.

There is a "Notify" function provided in PowerApps to achieve this.

Notify(<string message to show>, NotificationType)

There are four different types supported currently as shown below. It shows notification bars with different background colors.

  1. NotificationType.Information
  2. NotificationType.Error
  3. NotificationType.Success
  4. NotificationType.Warning
How To Show A Message In PowerApps

If you are fetching data from some data source on OnStart event, then you can combine the Notify function with your data fetch operation using Concurrent function. So that till the data gets fetched, the notification bar will be shown to the user.

 Example - 

Concurrent( FetchDataFromSQL.Run(), Notify(“Fetching data from SQL DB….”, NotificationType.Information))

Below are some examples how notification bar will appear in your PowerApps forms.

Notify("Your request has been submitted successfully!", NotificationType.Success)
 
How To Show A Message In PowerApps
 
Notify("On submit your manager will be informed!", NotificationType.Warning)
 
How To Show A Message In PowerApps
 
Notify("Fetching data from database…", NotificationType.Information)
 
How To Show A Message In PowerApps
 
Notify("One of the fields is empty!", NotificationType.Error)
 
How To Show A Message In PowerApps
 
I hope this helps.