Acknowledge All Button Script in Perspective

Hi all,

Very new to working with Ignition, so bare with me. I am working on creating a button in perspective that when pressed acknowledges all unacknowledged alarms in the session. After reading through a few posts I have come to a script that works correctly in the Script Console, but does not work when placed in a buttons script event. I have tried “onActionPerformed” , “onClick” and “onMouseUp”. Here is my script for reference

alarmlist = system.alarm.queryStatus(state = ["ActiveUnacked", "ClearUnacked"])
uuidlist = [str(row.getId()) for row in alarmlist]
system.alarm.acknowledge(uuidlist," ")

What am I doing wrong with the button script?

Your use of acknowledge() is the Vison-scoped usage. You need to sue the Gateway-scoped usage, which requires a username to be supplied.

Documentation

Yep, this worked. Thank you

1 Like