Skip to content

Commit d7bb2b5

Browse files
authored
Merge pull request MicrosoftDocs#2441 from MicrosoftDocs/gregli-notify
Update Notify function docs with new functionality
2 parents f4f2dd4 + f3cd781 commit d7bb2b5

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

powerapps-docs/maker/canvas-apps/functions/function-showerror.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
title: ShowError function | Microsoft Docs
3-
description: Reference information, including syntax and examples, for the ShowError function in Power Apps
2+
title: Notify function | Microsoft Docs
3+
description: Reference information, including syntax and examples, for the Notify function in Power Apps
44
author: gregli-msft
55
manager: kvivek
66
ms.service: powerapps
77
ms.topic: reference
88
ms.custom: canvas
99
ms.reviewer: tapanm
10-
ms.date: 06/05/2018
10+
ms.date: 02/28/2020
1111
ms.author: gregli
1212
search.audienceType:
1313
- maker
@@ -18,7 +18,7 @@ search.app:
1818
Displays a banner message to the user.
1919

2020
## Description
21-
The **Notify** function displays a banner message to the user at the top of the screen, overlaying what is currently displayed.
21+
The **Notify** function displays a banner message to the user at the top of the screen, overlaying what is currently displayed. The notification will remain until the user dismisses it, another notification replaces it, or the timeout expires which defaults to 10 seconds.
2222

2323
An appropriate color and icon are used depending on the type of the message. The type is specified by the second argument to the function:
2424

@@ -42,10 +42,11 @@ Power Apps can also send push notifications using an entirely different mechanis
4242
Note: This function was previously named **ShowError** when it could only display error messages.
4343

4444
## Syntax
45-
**Notify**( *Message*, [ *NotificationType* ] )
45+
**Notify**( *Message* [, *NotificationType* [ , *Timeout* ] ] )
4646

4747
* *Message* – Required. Message to display to the user.
48-
* *NotificationType* – Optional. Type of the message to display from the table above. The default is **NotificationType.Information**.
48+
* *NotificationType* – Optional. Type of the message to display from the table above. The default is **NotificationType.Information**.
49+
* *Timeout* – Optional. Number of milliseconds to wait before automatically dismissing the notification. The default is 10 seconds (or 10,000 milliseconds). The notification will be displayed indefinitely with a *Timeout* of 0.
4950

5051
## Examples
5152

@@ -59,7 +60,7 @@ Note: This function was previously named **ShowError** when it could only displa
5960

6061
3. Click or press the button.
6162

62-
Each time the button is clicked, the message **Hello, World** is displayed to the user as informational.
63+
Each time the button is clicked, the message **Hello, World** is displayed to the user as informational. It will dismiss automatically in 10 seconds (default timeout) if the user does not dismiss it or press the button again.
6364

6465
![In the authoring environment, showing Button.OnSelect calling Notify and displaying the resulting Hello, World message as a blue banner message for the user](media/function-showerror/hello-world.png)
6566

@@ -69,26 +70,26 @@ Note: This function was previously named **ShowError** when it could only displa
6970

7071
5. Click or press the button.
7172

72-
Now each time the button is clicked, the message **Hello, World** is displayed to the user as an error.
73+
Now each time the button is clicked, the message **Hello, World** is displayed to the user as an error. It will dismiss automatically in 10 seconds (default timeout) if the user does not dismiss it or press the button again.
7374

7475
![In the authoring environment, showing Button.OnSelect calling Notify and displaying the resulting Hello, World message as a red banner message for the user](media/function-showerror/hello-world-error.png)
7576

7677
4. Change the type of message to indicate a warning. Change the second argument in our formula:
7778

78-
**Notify( "Hello, World", NotificationType.Warning )**
79+
**Notify( "Hello, World", NotificationType.Warning, 4000 )**
7980

8081
5. Click or press the button.
8182

82-
Now each time the button is clicked, the message **Hello, World** is displayed to the user as a warning.
83+
Now each time the button is clicked, the message **Hello, World** is displayed to the user as a warning. It will dismiss automatically in 4 seconds (4,000 milliseconds) if the user does not dismiss it or press the button again.
8384

8485
![In the authoring environment, showing Button.OnSelect calling Notify and displaying the resulting Hello, World message as an orange banner message for the user](media/function-showerror/hello-world-warning.png)
8586

8687
4. Change the type of message to indicate success. Change the second argument in our formula:
8788

88-
**Notify( "Hello, World", NotificationType.Success )**
89+
**Notify( "Hello, World", NotificationType.Success, 0 )**
8990

9091
5. Click or press the button.
9192

92-
Now each time the button is clicked, the message **Hello, World** is displayed to the user as success.
93+
Now each time the button is clicked, the message **Hello, World** is displayed to the user as success. With a **0** timeout, the notification will only be dismissed by the user or by pressing the button again.
9394

9495
![In the authoring environment, showing Button.OnSelect calling Notify and displaying the resulting Hello, World message as a green banner message for the user](media/function-showerror/hello-world-success.png)

0 commit comments

Comments
 (0)