# Acknowledge All Button Script in Perspective

**URL:** <https://forum.inductiveautomation.com/t/acknowledge-all-button-script-in-perspective/38368>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [September 3, 2020, 8:14pm UTC](https://forum.inductiveautomation.com/t/acknowledge-all-button-script-in-perspective/38368 "2020-09-03T20:14:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pnoeldner](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@pnoeldner](https://forum.inductiveautomation.com/u/pnoeldner)\
**Post date:** [September 3, 2020, 8:14pm UTC](https://forum.inductiveautomation.com/t/acknowledge-all-button-script-in-perspective/38368/1 "2020-09-03T20:14:47Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [September 3, 2020, 8:33pm UTC](https://forum.inductiveautomation.com/t/acknowledge-all-button-script-in-perspective/38368/2 "2020-09-03T20:33:03Z")

</div>

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](https://docs.inductiveautomation.com/display/DOC80/system.alarm.acknowledge)

---

<div class="post-metadata">

**Author:** ![pnoeldner](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@pnoeldner](https://forum.inductiveautomation.com/u/pnoeldner)\
**Post date:** [September 3, 2020, 8:34pm UTC](https://forum.inductiveautomation.com/t/acknowledge-all-button-script-in-perspective/38368/3 "2020-09-03T20:34:03Z")

</div>

Yep, this worked. Thank you

---

<div class="post-metadata">

**Author:** ![kyle\_mallett](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@kyle\_mallett](https://forum.inductiveautomation.com/u/kyle_mallett)\
**Post date:** [January 26, 2024, 8:24pm UTC](https://forum.inductiveautomation.com/t/acknowledge-all-button-script-in-perspective/38368/4 "2024-01-26T20:24:51Z")

</div>

> [@pnoeldner](#):
>
> ```auto
> alarmlist = system.alarm.queryStatus(state = ["ActiveUnacked", "ClearUnacked"])
> uuidlist = [str(row.getId()) for row in alarmlist]
> system.alarm.acknowledge(uuidlist," ")
> 
> ```

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

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [January 26, 2024, 8:29pm UTC](https://forum.inductiveautomation.com/t/acknowledge-all-button-script-in-perspective/38368/5 "2024-01-26T20:29:56Z")

</div>

[https://docs.inductiveautomation.com/display/DOC81/system.alarm.queryStatus](https://docs.inductiveautomation.com/display/DOC81/system.alarm.queryStatus)

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

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 26, 2024, 8:34pm UTC](https://forum.inductiveautomation.com/t/acknowledge-all-button-script-in-perspective/38368/6 "2024-01-26T20:34:42Z")

</div>

> [@pnoeldner](#):
>
> ... so bare with me.

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