# Dynamically enabling/disabling UDTs embedded in another UDT

**URL:** <https://forum.inductiveautomation.com/t/dynamically-enabling-disabling-udts-embedded-in-another-udt/113458>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 21, 2026, 6:32pm UTC](https://forum.inductiveautomation.com/t/dynamically-enabling-disabling-udts-embedded-in-another-udt/113458 "2026-01-21T18:32:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![apatrick](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@apatrick](https://forum.inductiveautomation.com/u/apatrick)\
**Post date:** [January 21, 2026, 6:32pm UTC](https://forum.inductiveautomation.com/t/dynamically-enabling-disabling-udts-embedded-in-another-udt/113458/1 "2026-01-21T18:32:30Z")

</div>

Hello,

I am developing a UDT for a phase which has 64 embedded instances of another UDT used for parameters and reports. This embedded UDT has a Boolean PLC tag called “Cfg\_Has” which determines whether or not the parameter or report is used.

I would like to be able to have the embedded parameter/report UDTs to be dynamically enabled/disabled based on how many of the Cfg\_Has tags are set to True.

My idea was to use an expression tag to calculate a “count” of the number of parameters where the Cfg\_Has tag is True. Then use this tags value in the binding for the enabled property in an expression like: if({parameterCount} \>= x, True, False)

Unfortunately, there was no way to do this as the enabled property only allows parameter bindings.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/8/08feb5b08ed47edb480b3b66a8d1e8b021e72864.png)

I was able to get the enabling/disabling of the embedded UDTs to work by using a parameter in the phase UDT called parCount where the number of used phases could be entered, and adding this binding to the enabled/disabled property for the embedded parameter UDTs. For each one, the binding is parCount / (parameter instance number - 1) \* 2

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/1/d13ac772a31c9db2c8efbb5477b48516e2edb3d6.png)

So for a parameter count of 2, P\_0 enabled would be 2 which equates to true, P\_1 enabled would be 1 which equates to true, and P\_2 enabled would be 0.5 which equates to false. And all of the following would be false as well. This was the only way I could think of to get the enabled property to be dynamic based on one UDT parameter since that binding does not allow scripting just transforms for the parameter value.

Is there a more robust way to do this? And is there a way to have this be dynamic based on the value of a tag rather than a UDT parameter?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 21, 2026, 8:49pm UTC](https://forum.inductiveautomation.com/t/dynamically-enabling-disabling-udts-embedded-in-another-udt/113458/2 "2026-01-21T20:49:39Z")

</div>

Don't do this. At all.

Instead, take out the nested UDT and make their instances **peers** of the main UDT.

**Omit** instances where `Cfg_Has` is always false.

Let your UI examine any dynamic `Cfg_Has` to omit UI elements.
