# Unable to update a tags alarm config using editTag

**URL:** <https://forum.inductiveautomation.com/t/unable-to-update-a-tags-alarm-config-using-edittag/11003>\
**Category:** Ignition\
**Created:** [January 7, 2016, 12:21am UTC](https://forum.inductiveautomation.com/t/unable-to-update-a-tags-alarm-config-using-edittag/11003 "2016-01-07T00:21:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![RuggedcomAB](https://avatars.discourse-cdn.com/v4/letter/r/3e96dc/32.png) [@RuggedcomAB](https://forum.inductiveautomation.com/u/RuggedcomAB)\
**Post date:** [January 7, 2016, 12:21am UTC](https://forum.inductiveautomation.com/t/unable-to-update-a-tags-alarm-config-using-edittag/11003/1 "2016-01-07T00:21:52Z")

</div>

I have Ignition v7.7.4.  
Through scripting I am creating a tag, and setting up a single alarm condition called “DO Alarm1”.  
This appears to work. I can create the tag as scripted.

Later, I want to update the tag’s Display Path in the Alarm from a script (in essence, change the configuration) using:  
system.tag.editTag(tagPath=tagFP, alarmConfig={“DO Alarm”:[[“displaypath”, “Value”, newDisplayPath]]})

where:  
newDisplayPath is the new text I would like to write.  
tagFP is the full path to the tag.

This does not work and there are no errors. Any ideas?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [January 7, 2016, 10:36pm UTC](https://forum.inductiveautomation.com/t/unable-to-update-a-tags-alarm-config-using-edittag/11003/2 "2016-01-07T22:36:39Z")

</div>

I just tested this on a temp tag of mine and it worked fine.  
Test yours in the Script Console and see if it throws an error for you.  
Here is the code I used on an alarm named “DO”

```auto
NewDisplayPath="TEST"
system.tag.editTag(tagPath="TempDeleteLater/end_shift",alarmConfig={"DO":[["displaypath", "Value", NewDisplayPath]]})
```

---

<div class="post-metadata">

**Author:** ![RuggedcomAB](https://avatars.discourse-cdn.com/v4/letter/r/3e96dc/32.png) [@RuggedcomAB](https://forum.inductiveautomation.com/u/RuggedcomAB)\
**Post date:** [January 8, 2016, 12:35am UTC](https://forum.inductiveautomation.com/t/unable-to-update-a-tags-alarm-config-using-edittag/11003/3 "2016-01-08T00:35:12Z")

</div>

Very odd. Today it works. I only rebooted my system.  
Thanks for the help MMaynardUSG!

---

<div class="post-metadata">

**Author:** ![RuggedcomAB](https://avatars.discourse-cdn.com/v4/letter/r/3e96dc/32.png) [@RuggedcomAB](https://forum.inductiveautomation.com/u/RuggedcomAB)\
**Post date:** [January 8, 2016, 12:51am UTC](https://forum.inductiveautomation.com/t/unable-to-update-a-tags-alarm-config-using-edittag/11003/4 "2016-01-08T00:51:16Z")

</div>

More oddness. I added a line to my script to change two alarm parameters, the first one works (display path), but my change to my associated data does not.

```
system.tag.editTags(tagPath=[tagFP], alarmConfig={"DO Alarm":[["displaypath", "Value", newDisplayPath]]}) 
system.tag.editTags(tagPath=[tagFP], alarmConfig={"DO Alarm":[["OneText", "Value", "CLOSE"]]}) 

```

I’ll try combining these two lines and see what happens.

---

<div class="post-metadata">

**Author:** ![RuggedcomAB](https://avatars.discourse-cdn.com/v4/letter/r/3e96dc/32.png) [@RuggedcomAB](https://forum.inductiveautomation.com/u/RuggedcomAB)\
**Post date:** [January 14, 2016, 11:37pm UTC](https://forum.inductiveautomation.com/t/unable-to-update-a-tags-alarm-config-using-edittag/11003/5 "2016-01-14T23:37:53Z")

</div>

Okay, I figured out my mistake. This works:  
system.tag.editTag(tagPath=tagFP, alarmConfig={“DO Alarm”:[[“displaypath”, “Expression”, newDisplayPath], [“OneText”,“Value”, “CLOSE”]]})

I was missing a set of square brackets.

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [January 15, 2016, 9:44pm UTC](https://forum.inductiveautomation.com/t/unable-to-update-a-tags-alarm-config-using-edittag/11003/6 "2016-01-15T21:44:20Z")

</div>

what did you do different, it looks the same to me, outside of combining them. I ask because I tried writing to just associated data alone the other day and it wouldnt work.

---

<div class="post-metadata">

**Author:** ![marioquark](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@marioquark](https://forum.inductiveautomation.com/u/marioquark)\
**Post date:** [April 13, 2016, 2:23pm UTC](https://forum.inductiveautomation.com/t/unable-to-update-a-tags-alarm-config-using-edittag/11003/7 "2016-04-13T14:23:42Z")

</div>

Is it possible to configure a Bit State Alarm Mode using the system.tag.editTag function?  
I’ve tried with

`almConf = [['priority', 'Value', 3], \
				['ackMode', 'Value', 1], \
				['mode', 'Value', 13], \ DOES NOT WORK
				['bitPosition', 'Value', 5], \ DOES NOT WORK
				['timeOnDelaySeconds', 'Value', 3600], \
				['activePipeline', 'Value', 'Basic Pipeline'] \
				]
system.tag.editTag(tagPath=fullPath, alarmConfig={"test": almConf})`  
but it doesn’t work.  
Thanks!
