cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Yama_Vin
Level: Powered On

Power Apps- Push Notification

Hello Community, 

 

I was scessfully able to send a push notification from the PowerApps on a button click.  My question is , 

When user click on the notification, can we open a specif record?  Currently , when user clicks on the notification it just open the home page. 

 

Any help will be appriciated.  Please let me know if you need more details

 

Thanks

Yama

 

6 REPLIES 6
Yama_Vin
Level: Powered On

Re: Power Apps- Push Notification

Can anybody help me please ? Plesae let me know if you need more details on this. 

 

Thanks,. 

Yama

Super User
Super User

Re: Power Apps- Push Notification

@Yama_Vin 

I haven't worked with it to include parameters, but that is essentially what you want.  You need to be able to push the notification with the ID or some other identification of the record you want to open.

In your App you could look at the parameter (Param function) passed, such as ID, and if there is one, then navigate to the screen you want with the item you want.

 

The information for the connector indicates that you need to specify the URL for the Target Application.  I don't know if you can pass parameters there in the URL, but that would be my very first spot to check and see.

If that doesn't work, then it seems you can also pass a message body.  Perhaps you could also use that to pass an identification.

 

I hope this sheds some light for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Super User
Super User

Re: Power Apps- Push Notification

@Yama_Vin 

Actually in regard to my last post...I misread the docs, it is looking for the URL or ID of the app to create the connection needed.  I don't believe you can mess with that once connected.

 

But, you can pass the params as part of the recipient list.  This is the formula I found:

PowerAppsNotification.SendPushNotification(
{message:"your Message",
recipients:
["recipient1", <email>],
params:Table({key:"notificationKey", value:"The value for notificationKey"})
}
)

This is completely untested from my standpoint, but from what I see, this can be done.

Please review this documentation on the use of the notifications.  There is a section in there for passing parameters, both from Flow and PowerApps.

 

Hope this is clearer.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Yama_Vin
Level: Powered On

Re: Power Apps- Push Notification

@RandyHayes Thanks for the information. 

I tried this. I passed the ID as a parameter in the SendPushNotification  function. But I am not sure, How do i check the value from any other screen. I used Param("Key") in the home page and tried to see the value when opening on the device by clicking on the notification. But, nothing is disaying 

 

PowerAppsNotification.SendPushNotification({recipients:[emailtosend],message:"New Request",params:{key: "id", value:Text(Gallery1.Selected.ID)},openApp:true})

 

And i used 

Param("key") in a text property of the label to check the value. But it is not dispaying anything. 

 

Thanks, 

Yama

 

 

 

Super User
Super User

Re: Power Apps- Push Notification

@Yama_Vin 

Something strange happened to your posting...it disappeared from the forum.  It's back now!

 

Try this for your parameters - it is a table that is needed.

PowerAppsNotification.SendPushNotification(
{
  recipients:["email1@contoso.com", "email2@contoso.com"],
  message:"message in the notif toast",
  params:Table({key:"notificationKey", value:"The value for notificationKey"}),
  openApp:true
}
)

I believe you were close on your formula.  You just needed to put your parameter in a Table as highlighted above.

 

I hope this helps.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
sarveshshinde15
Level: Powered On

Re: Power Apps- Push Notification

Hi @Yama_Vin ,

 

Instead of Param("key"), try to use keyname instead i.e. Param("id").

I have used similar feature - but I had sent notificaiton from FLOW. 

 

Even if this doesnt work change the way you are sending parameter to simple JSON - dont use key and value keywords - instead try something as below 

{

 "id": "Text(Gallery1.Selected.ID)"

}

Hope this helps.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 87 members 4,464 guests
Please welcome our newest community members: