# TagEvent script in system.tag.addTag()

**URL:** <https://forum.inductiveautomation.com/t/tagevent-script-in-system-tag-addtag/18055>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [May 16, 2018, 7:22am UTC](https://forum.inductiveautomation.com/t/tagevent-script-in-system-tag-addtag/18055 "2018-05-16T07:22:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [May 16, 2018, 5:22pm UTC](https://forum.inductiveautomation.com/t/tagevent-script-in-system-tag-addtag/18055/2 "2018-05-16T17:22:35Z")

</div>

Using addTag()? No. Using configure()? Yes.

```auto
newTag = {}
newTag["name"] = "Some New Tag"
newTag["expressionType"] = "Expression"
newTag["expression"] = 'dateExtract(now(),"second")'
newTag["eventScripts"] = [{"eventid":"valueChanged","script":"\tprint \"Hello World\""}]

system.tag.configure(path="",tags = system.util.jsonEncode(newTag))

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/tagevent-script-in-system-tag-addtag/18055)._
