# Attaching a value change script to my managed tag from within Java at startup of module

**URL:** <https://forum.inductiveautomation.com/t/attaching-a-value-change-script-to-my-managed-tag-from-within-java-at-startup-of-module/61756>\
**Category:** Module Development\
**Tags:** scripting, ignition81\
**Created:** [July 11, 2022, 8:21pm UTC](https://forum.inductiveautomation.com/t/attaching-a-value-change-script-to-my-managed-tag-from-within-java-at-startup-of-module/61756 "2022-07-11T20:21:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom.prodehl](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tom.prodehl/32/22713_2.png) [@tom.prodehl](https://forum.inductiveautomation.com/u/tom.prodehl)\
**Post date:** [July 11, 2022, 8:21pm UTC](https://forum.inductiveautomation.com/t/attaching-a-value-change-script-to-my-managed-tag-from-within-java-at-startup-of-module/61756/1 "2022-07-11T20:21:51Z")

</div>

I create managed tags that are set at some point and want to trigger a script when the value changes. How do I attach a a script to my managed tag when it is created by my module?  
I got as far as getting tag config and trying to add WellKnownTag.EventScripts with a defined BasicTagEventScript, but don’t understand the validId and how to place a script into the object.  
An example?
