# IAlabs scripting module bug?

**URL:** <https://forum.inductiveautomation.com/t/ialabs-scripting-module-bug/6187>\
**Category:** 3rd Party Modules\
**Created:** [April 9, 2013, 8:45pm UTC](https://forum.inductiveautomation.com/t/ialabs-scripting-module-bug/6187 "2013-04-09T20:45:22Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [April 9, 2013, 8:45pm UTC](https://forum.inductiveautomation.com/t/ialabs-scripting-module-bug/6187/1 "2013-04-09T20:45:22Z")

</div>

I noticed when I run this script on an existing tag, that it deletes the existing alarm states that are setup. I am only trying to edit the alertmessagemode and the alertmessagesubject. Not sure if this is a bug or if I was just under the impression that we could edit individual parts of the attributes without having to declare all of the attributes.

`query = "select devicename from devices where devicename = '6090431'"
res = system.db.runQuery(query)
for row in res:
		identifier = row[0]
		system.tag.editTag(tagPath="%s/volts" % identifier, attributes={"AlertMessageMode":1, "AlertMessageSubject":"{%s/Location} {%s/Volts.Documentation} Alarm" % (identifier,identifier)})`

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [April 9, 2013, 10:30pm UTC](https://forum.inductiveautomation.com/t/ialabs-scripting-module-bug/6187/2 "2013-04-09T22:30:18Z")

</div>

That is a bug. I will get that fixed for you.
