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

Is there a way to a way to make this script dynamic? I need it to acknowledge just the alarms for a specific tag. appose to every single alarm in Ignition

https://docs.inductiveautomation.com/display/DOC81/system.alarm.queryStatus

Have a look at the various parameters that you can provide to fit your needs.

Tip: "bear with me" would be what you mean rather than an invitation to undress together! (As in, "to bear one-another's burdens.")