In this PowerApps tutorial, we will discuss how to use PowerApps notify function. I will show you how to use PowerApps notify function with syntax and examples.
By using PowerApps we can build App easily and we will see here how to use PowerApps notify function to display alerts and notifications in the Apps.
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.
Types of Alert or notification
Below are the types of notifications or alerts we can show in the PowerApps App.
NotificationType Argument | Description |
---|---|
NotificationType.Error | Displays the message as an error. |
NotificationType.Information (Default) | Displays the message as informational. |
NotificationType.Success | Displays the message as success. |
NotificationType.Warning | Displays the message as a warning. |
PowerApps Notify Syntax
Notify( Message [, NotificationType [ , Timeout ] ] )
- Message: In the message, you have to provide the text which you want to display.
- NotificationType: Here you need to provide the type of messages like success, error, information, or warning.
- Timeout: This is an optional field. You can set the timeout which will close some interval of time.
Read Build an app in Power Apps
PowerApps notify function example
Now let us check a PowerApps notify function example. We will take a few buttons in the PowerApps screen and on click of the button, we will display the notification.
Step 1: Login to the PowerApps and create a canvas app.
Step 2: On your screen, drag and drop a five-button which will display the different types of messages.
Step 3: Next add your formula in button OnSelect function.
In the same way, you have to apply your formula for the other four buttons.
Notify("Success",NotificationType.Success)
Notify("Failed",NotificationType.Error)
Notify("Information",NotificationType.Information)
Notify("Warning",NotificationType.Warning)
Step 4: Next save your page and debug it to see the output.
For Information:
You can see the below screen, the notification is appearing as Information.
For Success:
Below the screen, you can see a success message on the PowerApps screen.
For Failed:
Below the PowerApps screen, you can see it displays a Failed message.
For Warning
You can see a warning message on the PowerApps screen.
You can also set Timeout in your formula to close the message automatically after some interval.
Notify("Success",NotificationType.Success , 2000)
Notify("Failed",NotificationType.Error , 2000)
Notify("Information",NotificationType.Information , 2000)
Notify("Warning",NotificationType.Warning , 2000)
You may like the following PowerApps tutorials:
- Share PowerApps to external users or guest users
- Saving microphone audio recorded in PowerApps to SharePoint online
- PowerApps filter SharePoint list Example
- Display COVID-19 Power bi report in PowerApps
- How to embed Power bi report in PowerApps portal
- How to display Power bi google analytics in PowerApps
- Display Office 365 User Profile Properties in PowerApps
In this tutorial, we learned how to display alerts and notifications in PowerApps. Also, we discussed, how to use the PowerApps Notify function with examples.
Rajkiran is currently working as a SharePoint Consultant in India . Rajkiran having 7+ years of experience in Microsoft Technologies such as SharePoint 2019/2016/2013/2010, MOSS 2007,WSS 3.0, Migration, Asp.Net, C#.Net, Sql Server, Ajax, jQuery etc.He is C#Corner MVP (2 Times).