Perspective Message Handler not able to pass the payload

Hi,

I have an icon in the table component where alarms are displayed. When I click on the icon, I navigate to a different view based on the configured alarm (by changing the path of the embedded view) and send the tag name as a payload.

When navigating to another main view, I have an embedded template view that highlights the component for which the alarm was triggered.

I have written an OnMessageReceived script to receive the payload in the template view, but I am not receiving any payload there.

I tried troubleshooting with multiple print statements, but nothing is being printed in the OnMessageReceived script.

The scope of the message handler is set to Page.

Any suggestions would be helpful.

If you are using an embedded view, I would just pass the necessary information for each alarm in as a parameter (params prop on the component). Anything you are passing via the payload of this message, you can just set as parameters for the view. Then in the script that is switching the embedded view path I would also change the values of the params property.

This way you don't have to worry about throwing this message out over here and catching it over there.