# Dynamic Alarm binding UDT

**URL:** <https://forum.inductiveautomation.com/t/dynamic-alarm-binding-udt/84790>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [January 25, 2024, 9:40pm UTC](https://forum.inductiveautomation.com/t/dynamic-alarm-binding-udt/84790 "2024-01-25T21:40:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johnnie\_McCord](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@Johnnie\_McCord](https://forum.inductiveautomation.com/u/Johnnie_McCord)\
**Post date:** [January 25, 2024, 9:40pm UTC](https://forum.inductiveautomation.com/t/dynamic-alarm-binding-udt/84790/1 "2024-01-25T21:40:15Z")

</div>

Hello All,

I am working on my first project in Ignition.

I have a UDT defined representing a generator. The UDT has multiple tags with alarms.

I would like to parameterize the alarm labels to avoid editing each alarm string individually. I have three parameters:  
{num} is defined on the root in the UDT,  
{signal} and {phase} are defined on each tag in the UDT that has the alarms.

On each tag with the alarms I have set the label binding expression as:  
"GEN " + {num} + " " + {signal} + " " + {phase} + HIGH" (or low, etc.)

{num} is correctly updating to the parameter value on the UDT root, but {signal} and {phase} appear exactly as shown above instead of being replacing with the tag parameters.

Any pointers on what I'm doing wrong?

I would also like to dynamically inhibit the alarms when the generator is not running. The UDT has a boolean RUN\_STATUS OPC tag. I tried to bind the alarm enable property on the tags in question to RUN\_STATUS, but alarm enable appears to only allow parameter binding.

Is there a way that I can dynamically disable alarms on UDT tags based on the value of a sibling tag in the same UDC?

Thanks!

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [January 26, 2024, 2:58pm UTC](https://forum.inductiveautomation.com/t/dynamic-alarm-binding-udt/84790/2 "2024-01-26T14:58:43Z")

</div>

> [@Johnnie\_McCord](#):
>
> {num} is defined on the root in the UDT,  
> {signal} and {phase} are defined on each tag in the UDT that has the alarms.

Do you mean `num` is an UDT parameter and the other two are custom data properties on the tags ?  
like `foo` in the screenshot below ?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/2/9293a96a1d66bccfeb7a3177dda6c4b5070457d9.png)

If that's the case, in the alarm's label, you can access your custom data with `tag({PathToTag}.signal)`.  
There might be a better way, but while you wait for someone with more knowledge to chime in, it should get it working.

If you meant something else, you'll have to be more accurate.

---

<div class="post-metadata">

**Author:** ![Johnnie\_McCord](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@Johnnie\_McCord](https://forum.inductiveautomation.com/u/Johnnie_McCord)\
**Post date:** [January 29, 2024, 9:42pm UTC](https://forum.inductiveautomation.com/t/dynamic-alarm-binding-udt/84790/3 "2024-01-29T21:42:24Z")

</div>

Thank you for the suggestion.

You are correct in your assumption the {num} is a UDT parameter, {signal} and {phase} are custom properties on tags that defined as part of the UDT. Apologies for the incorrect terminology.

I modified the label expression binding as you suggested but the label property on an instantiated UDT evaluates to NULL.

When the label property is set to only {PathToTag}, the instantiated label correctly evaluates to a string containing the correct tag path. When I try to access the custom property using {PathToTag}.signal or tag({PathToTag}.signal), the label evaluates to NULL. I have verified that the signal custom property is not NULL.

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

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/a/4a17c6cfb5b09eb82333c0cec820ba0a5f5bd04d.png)

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [February 2, 2024, 2:11pm UTC](https://forum.inductiveautomation.com/t/dynamic-alarm-binding-udt/84790/4 "2024-02-02T14:11:20Z")

</div>

I'm not sure where you can go from here... Maybe try with `tag({PathToTag} + ".signal")`, or with "`/signal`" instead of "`.signal`".

---

<div class="post-metadata">

**Author:** ![edward.fowler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/edward.fowler/32/24179_2.png) [@edward.fowler](https://forum.inductiveautomation.com/u/edward.fowler)\
**Post date:** [July 29, 2024, 8:55pm UTC](https://forum.inductiveautomation.com/t/dynamic-alarm-binding-udt/84790/5 "2024-07-29T20:55:50Z")

</div>

Maybe

{this.myProptery}

> **[Tag Paths | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/platform/tags/tag-paths)**
>
> Tags and their properties can be referenced by a string-based path in many areas of Ignition, such as expressions and scripts. Each Tag has a unique absolute path and often has many equivalent relative paths when referenced from other Tags. In most...

---

<div class="post-metadata">

**Author:** ![tyler.bennett](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@tyler.bennett](https://forum.inductiveautomation.com/u/tyler.bennett)\
**Post date:** [July 29, 2024, 9:08pm UTC](https://forum.inductiveautomation.com/t/dynamic-alarm-binding-udt/84790/6 "2024-07-29T21:08:15Z")

</div>

Agreeing with @edward.fowler  
See: [Using the {this} keyword](https://docs.inductiveautomation.com/docs/8.1/platform/tags/tag-paths#using-the-this-keyword)

You are also missing the opening double quote around `High` in the example.

> [@Johnnie\_McCord](#):
>
> ```plaintext
> "GEN " + {num} + " " + {signal} + " " + {phase} + HIGH" 
> 
> ```

Becomes

```plaintext
"GEN " + {num} + " " + {this.signal} + " " + {this.phase} + " HIGH" 

```
