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.
- NotificationType.Information
- NotificationType.Error
- NotificationType.Success
- NotificationType.Warning
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)
Notify("On submit your manager will be informed!", NotificationType.Warning)
Notify("Fetching data from database…", NotificationType.Information)
Notify("One of the fields is empty!", NotificationType.Error)