# Do Something on UDT Enabled

**URL:** <https://forum.inductiveautomation.com/t/do-something-on-udt-enabled/20337>\
**Category:** Ignition\
**Tags:** python, ignition79, scripting\
**Created:** [October 24, 2018, 2:05am UTC](https://forum.inductiveautomation.com/t/do-something-on-udt-enabled/20337 "2018-10-24T02:05:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexanderfalinsky](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@alexanderfalinsky](https://forum.inductiveautomation.com/u/alexanderfalinsky)\
**Post date:** [October 24, 2018, 2:05am UTC](https://forum.inductiveautomation.com/t/do-something-on-udt-enabled/20337/1 "2018-10-24T02:05:57Z")

</div>

I have a UDT and I want to trigger a function when the tag is enabled/disabled.

Attempts:

- Add an **enabled** tag to the UDT and then have it write to the enabled/disabled attribute of another tag - **value** - in the UDT that represents the value of the UDT overall.

Here I use the following to change enabled/disabled in the **enabled** ’s Tag Change event:  
**system.tag.write(’[.]value.Enabled’,currentValue.value)**

This does not work well, because it seems subject to the scan class of the **value** tag, which the user is able to set to very slow rates.

Inside that same Tag Change event for the **enabled** tag in the UDT, I do some other stuff.

Does anyone have any suggestions on how to either speed up my current method or a different method that will still allow me to do something when the UDT or **value** in the UDT is enabled/disabled?
