# Problem with Tag Change event script

**URL:** <https://forum.inductiveautomation.com/t/problem-with-tag-change-event-script/7098>\
**Category:** Ignition\
**Created:** [August 20, 2013, 11:39pm UTC](https://forum.inductiveautomation.com/t/problem-with-tag-change-event-script/7098 "2013-08-20T23:39:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shreyaslimaye](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@shreyaslimaye](https://forum.inductiveautomation.com/u/shreyaslimaye)\
**Post date:** [August 20, 2013, 11:39pm UTC](https://forum.inductiveautomation.com/t/problem-with-tag-change-event-script/7098/1 "2013-08-20T23:39:28Z")

</div>

Hello,

I am using Ignition Version: 7.6.3-rc2 (b2448). I am trying to create an SQL Tag Change Event script in Client Event Scripts. I followed the user manual and tried running the following script as shown in the manual. This particular script works.

“Received tag change event for %s” % event.tagPath  
value = newValue.value  
quality = newValue.quality  
timestamp = newValue.timestamp  
print “value=%s, quality=%s, timestamp=%s” %(value, quality, timestamp)

However, now I am trying to improvise on this example for my purpose which is where I am running into an error. I want to store the tagPath name as a string and use it later on. So, I tried to use the following

tagname = str(event.tagPath) Or  
tagname = event.tagPath

However, in either case, I get an error in the Diagnostics \> Console saying  
AttributeError: ‘com.inductiveautomation.ignition.common.sqltags.mo’ object has no attribute ‘tagpath’

Can someone please let me know what is the correct way to store the event.tagPath name in a variable?

Thanks,

Shreyas

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 20, 2013, 11:44pm UTC](https://forum.inductiveautomation.com/t/problem-with-tag-change-event-script/7098/2 "2013-08-20T23:44:38Z")

</div>

Are you sure you used ‘event.tagPath’ in your code and not ‘event.tagpath’ like the error message you copied indicates?

```auto
tagName = str(event.tagPath)
```

should work.

---

<div class="post-metadata">

**Author:** ![shreyaslimaye](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@shreyaslimaye](https://forum.inductiveautomation.com/u/shreyaslimaye)\
**Post date:** [August 20, 2013, 11:47pm UTC](https://forum.inductiveautomation.com/t/problem-with-tag-change-event-script/7098/3 "2013-08-20T23:47:45Z")

</div>

Hello Kevin,

Yes, I am using event.tagPath. Still the error message continues to say tagpath is not available.  
☹

Shreyas

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 20, 2013, 11:49pm UTC](https://forum.inductiveautomation.com/t/problem-with-tag-change-event-script/7098/4 "2013-08-20T23:49:28Z")

</div>

Can you copy/paste your entire script here. Make sure to use the forum’s code tags to preserve tabs.

---

<div class="post-metadata">

**Author:** ![shreyaslimaye](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@shreyaslimaye](https://forum.inductiveautomation.com/u/shreyaslimaye)\
**Post date:** [August 20, 2013, 11:57pm UTC](https://forum.inductiveautomation.com/t/problem-with-tag-change-event-script/7098/5 "2013-08-20T23:57:44Z")

</div>

Hello Kevin,

I think I found the problem. I was not updating my project. Once I updated my project, at least this part where I get the tagPath into string started working! I will work on the rest of the script now! Thank you very much for your help. I very much appreciate you responding very quickly to my question!

Shreyas
