# Individial Alarm Acknowledge Button

**URL:** <https://forum.inductiveautomation.com/t/individial-alarm-acknowledge-button/70317>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [February 24, 2023, 10:03pm UTC](https://forum.inductiveautomation.com/t/individial-alarm-acknowledge-button/70317 "2023-02-24T22:03:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brodie\_Pascal](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@Brodie\_Pascal](https://forum.inductiveautomation.com/u/Brodie_Pascal)\
**Post date:** [February 24, 2023, 10:03pm UTC](https://forum.inductiveautomation.com/t/individial-alarm-acknowledge-button/70317/1 "2023-02-24T22:03:17Z")

</div>

Has anyone had any luck creating a button similar to the alarm status table acknowledge button, but for an individual device such as a motor or valve (only acknowledge the alarms for that specific device/tag)?

---

<div class="post-metadata">

**Author:** ![andrews](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@andrews](https://forum.inductiveautomation.com/u/andrews)\
**Post date:** [February 24, 2023, 10:22pm UTC](https://forum.inductiveautomation.com/t/individial-alarm-acknowledge-button/70317/2 "2023-02-24T22:22:27Z")

</div>

You can script it via the info here [https://docs.inductiveautomation.com/display/DOC81/system.alarm.acknowledge](https://docs.inductiveautomation.com/display/DOC81/system.alarm.acknowledge)  
Scroll to bottom for example.

---

<div class="post-metadata">

**Author:** ![Brodie\_Pascal](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@Brodie\_Pascal](https://forum.inductiveautomation.com/u/Brodie_Pascal)\
**Post date:** [February 24, 2023, 10:33pm UTC](https://forum.inductiveautomation.com/t/individial-alarm-acknowledge-button/70317/3 "2023-02-24T22:33:27Z")

</div>

Thanks! Although I am looking for something that doesn't reference a table.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 24, 2023, 10:36pm UTC](https://forum.inductiveautomation.com/t/individial-alarm-acknowledge-button/70317/4 "2023-02-24T22:36:10Z")

</div>

> [@Brodie\_Pascal](#):
>
> that doesn't reference a table.

What do you mean? Those functions work anywhere, you just have to look up the UUID of the alarm you wish to clear. You don't need a table. (Look closer at the examples.)

---

<div class="post-metadata">

**Author:** ![andrews](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@andrews](https://forum.inductiveautomation.com/u/andrews)\
**Post date:** [February 25, 2023, 2:39am UTC](https://forum.inductiveautomation.com/t/individial-alarm-acknowledge-button/70317/5 "2023-02-25T02:39:35Z")

</div>

> [@Brodie\_Pascal](#):
>
> that doesn't reference a table

One example references a table, but the other two examples _do not_. All you need is the alarm ID to pass into the function.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [February 25, 2023, 1:31pm UTC](https://forum.inductiveautomation.com/t/individial-alarm-acknowledge-button/70317/6 "2023-02-25T13:31:44Z")

</div>

> [@andrews](#):
>
> but the other two examples _do not_

I don't see a method in the examples for looking up the UUID, so that's probably what is making this difficult.

Here is a method I have developed for doing this:

```auto
path = '[Sample_Tags]Ramp/Ramp3/Alarms/High Alarm' #Example Path
#The above path can be shortened to be more inclusive
#Examples:
#'[Sample_Tags]Ramp/Ramp3` #This would clear all alarms on the ramp3 tag
#'[Sample_Tags]Ramp #This would clear all alarms on all of the tags in the Ramp folder
#'[Sample_Tags] #This would clear all alarms within the provider
#'' or #None #This would clear all alarms

def getSourcePath(path):
	sourcePath = path.replace('[', 'prov:').replace(']', ':/tag:').replace('/Alarms/', ':/alm:', 1) + '*'
	return sourcePath
sourcePath = getSourcePath(path)
alarms = system.alarm.queryStatus(path = [sourcePath])
alarmIds = []
for alarm in alarms:
	UUID = str(alarm.id)
	alarmIds.append(UUID)
notes = None #If notes are required, then a method for obtaining this input will have to be developed and added here
system.alarm.acknowledge(alarmIds, notes)

```

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [February 25, 2023, 3:07pm UTC](https://forum.inductiveautomation.com/t/individial-alarm-acknowledge-button/70317/7 "2023-02-25T15:07:31Z")

</div>

Spin this up in an async call if you are using this from a button. It'll freeze the gui while it is doing this.
