Sending a popup to respective session based on session custom property

Hi there,

Currently we are launching our perspective Project at multiple locations hence multiple sessions are active. I’ve created session properties to use it in the session.

What our current requirement is I need send a warning popup to the only session where XYZ session value is selected.
For example if there are session 1 to session 20 are active, I need to check session property value of each and based on that display a warning popup to the only session whose session property value matches to XYZ.

It does seem easy to implement, like check the session property == XYZ and if true display popup. However I’m confused whether that warning popup will appear on all currently active sessions or just on that single session.

I need it to appear only on that session. Please suggest.

Ignition: 8.1
Windows 10
Perspective module

Where are you sending from and how often is it happening?

I need to test this, but I think if you specify the sessionId as a parameter to system.perspective.openPopup, then you can target a specific session. I haven’t tested this, though.

Here is the document I’m reading. Also, note that the pageId is required if you’re targeting a session other than the current one you are working in.

If you provide more information, I think we can figure this out…

I am sending it from project script. Its basically I need to check whether the certain Station is selected at the session and send the popup after each 15 mins based on some data present in DB.

Yes I can specify the sessionId in system.perspective.openPopup , however how to fetch the session.custom.property of that session? So if sessionId X has session.custom.property == value X then pass sessionId X as a parameter to system.perspective.openPopup

you could also send a message to all sessions and let the message handlers inside the client check if it has the right property or not

3 Likes