# EditTag example for modifying alarm properties?

**URL:** <https://forum.inductiveautomation.com/t/edittag-example-for-modifying-alarm-properties/12250>\
**Category:** Ignition\
**Created:** [October 18, 2016, 12:05am UTC](https://forum.inductiveautomation.com/t/edittag-example-for-modifying-alarm-properties/12250 "2016-10-18T00:05:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lifejustice2](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@lifejustice2](https://forum.inductiveautomation.com/u/lifejustice2)\
**Post date:** [October 18, 2016, 12:05am UTC](https://forum.inductiveautomation.com/t/edittag-example-for-modifying-alarm-properties/12250/1 "2016-10-18T00:05:27Z")

</div>

I need a little help with understanding edittag function…specifically the alarmList and alarmConfig parameters.

My workflow overall is this:  
-Get Alarm properties (done)  
I am able to use the getAlarmProperties() to recieve the property names and property values.  
-Modify those properties (done)  
I am able to modify the properties in a table on screen  
-Save new alarm properties to tag. (not done)  
I need to save the contents of the table to the tag alarms.

It looks like the editTag function is expecting a string for the alarm list, but a dictionary for the alarm configuration. I am not sure how to make the syntax to get the function to work.

How do I get this alarm property table into the editTag() function?

---

<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:** [October 18, 2016, 3:55pm UTC](https://forum.inductiveautomation.com/t/edittag-example-for-modifying-alarm-properties/12250/2 "2016-10-18T15:55:36Z")

</div>

You might have a better time using the editAlarmConfig function. It’s got a fairly unusual syntax of arguments; basically, you pass a list of tagpaths, then a dictionary with a key for each alarm to be modified, and a list of alarm properties to change, which itself is another list - a three item set of the property name, the identifier that you’re changing its “Value”, and the new value that you’re going to set it to.

[code]#Build a list of tag paths. Only a single tag will be altered, so create a list of one item and store the list in a variable  
tagPaths = [“sensors/B3:0”]

#Build the dictionary of alarm names, and properties to change.  
alarmConfig = {“High Temp”:[[“name”,“Value”,“Low Temp”],[“setpointA”,“Value”,“100”]]}

#Edit the alarm configuration.  
system.tag.editAlarmConfig(tagPaths, alarmConfig)[/code]

[docs.inductiveautomation.com/di … larmConfig](https://docs.inductiveautomation.com/display/DOC79/system.tag.editAlarmConfig)

---

<div class="post-metadata">

**Author:** ![lifejustice2](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@lifejustice2](https://forum.inductiveautomation.com/u/lifejustice2)\
**Post date:** [October 18, 2016, 5:25pm UTC](https://forum.inductiveautomation.com/t/edittag-example-for-modifying-alarm-properties/12250/3 "2016-10-18T17:25:12Z")

</div>

So I try to do the command, but it isn’t working and I don’t have any feedback as to why.

Just so that I understand correctly, does the syntax on the alarmConfig look correct?

This is based on the data in the table above.

My goal is to change setpointA in “Alarm” to 2.0.

```auto
alarmConfig = {"Alarm":[["setpointA","Value","2.0"]]}

tagPath = "[default]TagContainingAlarm]"

system.tag.editAlarmConfig(tagPath, alarmConfig)
```

Edited to add: I found the issue. I was trying to send tagPath as a string instead of a list.

Thank you for your help!
