Open a popup window in the script of Alarm event of a tag

Good afternoon,

I want to open a popup window in the script of Alarm event in a tag.

I try with this code:

window = system.nav.openWindow('Popups/POPUP ALLARME', {'indice_report' : indice_report, 'numero_allarme' : numero_allarme, 'testo_allarme' : testo_allarme })
system.nav.centerWindow(window)

With this instruction, there is errors.

How can solve this problem ??

Thank you

Tag events, including alarm events, are not part of any UI. And they run in the gateway, not in Vision clients. You will probably want to broadcast a message from gateway to client scope, and use a Vision client message handler to open the popup.