
If you send a push notification with a parameter to an app, it works fine, it will open the app and pass the parameter. Once passed you can't change the value of that parameter, this is unfortunate but OK. The real issue is PowerApps can't update it's own parameters either. If you send a second push notification with a new value in the parameter, the existing value is not overwritten, you have to close the app, to see the new value.
In my scenario, users must log an entry twice a day. If they forget I send a notification for the day and period they're missing. When they click + to add a record, I set the date equal to the value of the push parameter. Works great the first time but not the second.
One solution is to close the app after the user makes an entry but It is not efficient to close apps on a mobile nor is it UI friendly. Furthermore, I'm using the standard phone layout for Sharepoint, MS didn't include a close button in the UI (and neither would I). So the user has to close out the app with a swipe or back button but that's not going to happen.
Is there a way to get that second notification parameter without closing the app?
Hi @nigel_s ,
Based on the issue that you mentioned, actually, it is an normal behavior with the PowerApps Push Notification functionality.
The parameters you specified within the PowerAppsNotification.SendPushNotification() function would be passed into the opening app only when you click the notification to run the app. Then you could use the Param() function to receive the passed parameter values.
If you want to receive the passed parameters within the second notification without closing current app, I afraid that there is no way to achieve your needs in PowerApps currently.
If you would like this feature to be added, please submit an idea to PowerApps Ideas Forum:
https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas
As an alternative solution, you could consider send an outlook email notification using Power Automate flow and embed the App URL Link of the target app within the email body. When the recipient click the embedded URL link, it would be navigate to run this app. On your side, you could append some parameter values along with the App URL Link, then within your canvas app, you could use the Param function to receive passed parameter values.
Please check and see if the following thread would help in your scenario:
The standard format of the App URL Link along with parameters as below:
"https://apps.powerapps.com/play/a8bdf1d5-87b2-4be1-8948-86529f53887a?tenantId=9e51064f-xxxx-41a2-xxxx-9785a9d6c706&Param1=" & "Value1" & "&Param2=" & "Value2"
Best regards,