Problem with Tag Change event script

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

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

tagName = str(event.tagPath)

should work.

Hello Kevin,

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

Shreyas

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

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