Skip to content

Commit eaf5b72

Browse files
authored
Merge pull request #3802 from MicrosoftDocs/mints-PA-mobile
push notifications updates
2 parents 3a26cbd + 1a31180 commit eaf5b72

File tree

3 files changed

+32
-24
lines changed

3 files changed

+32
-24
lines changed

powerapps-docs/maker/canvas-apps/add-notifications.md

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -58,29 +58,6 @@ In this article, the sample app used for notifications is built from the default
5858

5959
![Power Apps formula](./media/add-notifications/powerapps-function.png)
6060

61-
## Perform an action when a user taps the notification
62-
63-
### Pass parameters
64-
65-
Your push notification can pass specific parameters to the app. For example, to read the **CaseID** value, use *Param("CaseID")*. To quickly identify this parameter, add a **Label** control to your app. Set the **Text** property of that control to **Param("CaseID")**. If the user opens the app from the **All apps** list, the value is empty. If the user opens the app from another ___location on the device, the value is populated with the **CaseID** value.
66-
67-
### Set the start page
68-
69-
You can set your app to open, for example, the **Case details** page as soon as the app opens:
70-
71-
1. Add a **Timer** control, and set its **OnTimerEnd** property to this formula:
72-
73-
`Navigate(EditCase, ScreenTransition.None)`
74-
75-
1. (optional) Hide the **Timer** control by setting its **Visible** property to **false**.
76-
77-
1. Set the **OnVisible** property of the screen to **Timer.Start()**.
78-
79-
> [!TIP]
80-
> It's a good idea to create a unique first page in the app for the notification:
81-
>
82-
> 1. Create an empty page that your app doesn't already open, add a **Text Input** control, and set its **timer.Duration** value.
83-
> 2. When you create the app, set the timer to a non-zero value. When you're ready to publish the app, set the value to **0** to immediately trigger the timer.
8461

8562
## Syntax
8663

8.29 KB
Loading

powerapps-docs/mobile/power-apps-mobile-notification.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,45 @@ When you trigger a push notification from a flow, you can send the notification
112112
- **Recipient Items-1**: Select how the flow is triggered.
113113
- **Message**: Enter the notification message.
114114
- **Open app**: Select whether to open the app or not when the user selects the notification.
115-
- **Parameters**: Key-value parameters to pass with the notification. Your push notification can pass specific parameters to the app. These can be further processed in the app to open a specific page and load a specific state. For more information, see [Load a specific page and context when a user taps the notification](https://docs.microsoft.com/powerapps/maker/canvas-apps/add-notifications#load-a-specific-page-and-context-when-a-user-taps-the-notification).
115+
- **Parameters**: Key-value parameters to pass with the notification. Your push notification can pass specific parameters to the app. These can be further processed in the app to open a specific page and load a specific state. For more information, see [Perform an action when a user taps the notification](power-apps-mobile-notification.md#perform-an-action-when-a-user-taps-the-notification).
116116

117117
![Enter the notification information](media/canvasapp-info.png)
118118

119119
8. When you're done, select **Save**.
120120
9. Select **Flow checker** to check for error or warnings.
121121
10. Test the flow by selecting **Test** and follow the prompts.
122122

123+
## Perform an action when a user taps the notification
124+
125+
### Pass parameters
126+
127+
For canvas apps, you can pass key-value pairs using the **Parameters** field as JSON. For example, if you wanted to pass the CaseID, you would put the following as **Parameters**:
128+
` { "CaseID": 42 }`. You can also use dynamic values from earlier steps as shown below.
129+
130+
![Sample parameters](media/para-image.png)
131+
132+
### Read parameters
133+
134+
To read the passed parameters, use Param("ParameterName"). For example, to read the **CaseID** value, use *Param("CaseID")*. To quickly identify this parameter, add a **Label** control to your app. Set the **Text** property of that control to **Param("CaseID")**. If the user opens the app from the **All apps** list, the value is empty. If the user opens the app from another ___location on the device, the value is populated with the **CaseID** value.
135+
136+
### Set the start page
137+
138+
You can set your app to open, for example, the **Case details** page as soon as the app opens:
139+
140+
1. Add a **Timer** control, and set its **OnTimerEnd** property to this formula:
141+
142+
`Navigate(EditCase, ScreenTransition.None)`
143+
144+
1. (optional) Hide the **Timer** control by setting its **Visible** property to **false**.
145+
146+
1. Set the **OnVisible** property of the screen to **Timer.Start()**.
147+
148+
> [!TIP]
149+
> It's a good idea to create a unique first page in the app for the notification:
150+
>
151+
> 1. Create an empty page that your app doesn't already open, add a **Text Input** control, and set its **timer.Duration** value.
152+
> 2. When you create the app, set the timer to a non-zero value. When you're ready to publish the app, set the value to **0** to immediately trigger the timer.
153+
123154

124155
## Known limitations
125156

0 commit comments

Comments
 (0)