Hi everyone,
I’ve recently started working on ignition perspective and I’m having issues with raising a popup window on whatever page the user is on when there’s a fault.
I have a really simple setup as below:
on the tag that needs to be monitored, I have setup a script on value changed:
option 1, I tried the ‘session’ scope, but this is not ideal as I need the popup to appear on all sessions. It wasn’t really stable either, it works less than half of the time:
res = system.util.sendMessage(project="Test_Page",messageHandler="open_popup",payload={},scope="session",clientSessionId=res[0].value)
option 2, I tried the ‘client’ scope, but this didn’t work at all. Tried the “C” for scope as well, no joy:
res = system.util.sendMessage(project="Test_Page",messageHandler="open_popup",scope="client")
res is an empty list almost all the time but it returns the following when it works with option 1:
send message result: [type=Session,sessionId=90adb2cd-e7b2-4ad3-9479-659ad7881fef,project=Test_Page,messageHandler=open_popup,filterParams={clientSessionId=90adb2cd-e7b2-4ad3-9479-659ad7881fef, userRoles=, scope=S, userZones=},isRequest=no,sendStatus=SENT]
I have “open_popup” session message handler setup on Session Events in “Test_Page” project but the message handler almost never receives anything. Plan is to relay the message from here to a component using something like:
system.perspective.sendMessage('open_popup_card', payload)
It would be really appreciated if someone could point out what I am doing wrong or why it isn’t working.
Many thanks everyone.