# How to make 'Acknowledge All' button

**URL:** <https://forum.inductiveautomation.com/t/how-to-make-acknowledge-all-button/76265>\
**Category:** Ignition\
**Tags:** vision, ignition81\
**Created:** [July 12, 2023, 3:56pm UTC](https://forum.inductiveautomation.com/t/how-to-make-acknowledge-all-button/76265 "2023-07-12T15:56:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zach\_The](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zach_the/32/49673_2.png) [@Zach\_The](https://forum.inductiveautomation.com/u/Zach_The)\
**Post date:** [July 12, 2023, 3:56pm UTC](https://forum.inductiveautomation.com/t/how-to-make-acknowledge-all-button/76265/1 "2023-07-12T15:56:47Z")

</div>

How do you make a custom 'acknowledge all' button? I'm sure there is a bunch of behind the scenes commands for alarm handling but I can't find anything obvious in the vision property editor

My best guess is something like system.alarm.acknowledge([\*], '')

Also is there a way to prevent repeated instances of alarms from getting combined in the alarm history? If something triggers 4 times then I want to see those 4 instances separately even after its cleared and acknowledged

Cheers,  
Zach

---

<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:** [July 12, 2023, 4:05pm UTC](https://forum.inductiveautomation.com/t/how-to-make-acknowledge-all-button/76265/2 "2023-07-12T16:05:00Z")

</div>

This is how i've done it in the past:

```auto
stringlist = []
list = system.alarm.queryStatus(state=["ActiveUnacked", "ClearUnacked"])

for id in list:
	stringlist.append(str(id.getId()))
	
system.alarm.acknowledge(stringlist,'', "admin")

```

---

<div class="post-metadata">

**Author:** ![Zach\_The](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zach_the/32/49673_2.png) [@Zach\_The](https://forum.inductiveautomation.com/u/Zach_The)\
**Post date:** [July 12, 2023, 4:08pm UTC](https://forum.inductiveautomation.com/t/how-to-make-acknowledge-all-button/76265/3 "2023-07-12T16:08:11Z")

</div>

It throws an error because it doesn't expect the 3rd argument in system.alarm.acknowledge() but otherwise perfect, thank you!

---

<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:** [July 12, 2023, 4:12pm UTC](https://forum.inductiveautomation.com/t/how-to-make-acknowledge-all-button/76265/4 "2023-07-12T16:12:14Z")

</div>

I ran mine gateway scoped, if you are doing it from the client then no third argument.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 12, 2023, 4:42pm UTC](https://forum.inductiveautomation.com/t/how-to-make-acknowledge-all-button/76265/5 "2023-07-12T16:42:50Z")

</div>

Golfed a little bit (and avoiding use of the builtin function names `id` and `list`):

```python
ids = [str(event.id) for event in system.alarm.queryStatus(state=["ActiveUnacked", "ClearUnacked"])]
	
system.alarm.acknowledge(ids,'', "admin")

```
