# Using UDT parameters in Alarms Expressions

**URL:** <https://forum.inductiveautomation.com/t/using-udt-parameters-in-alarms-expressions/14095>\
**Category:** Ignition\
**Created:** [April 20, 2017, 4:52pm UTC](https://forum.inductiveautomation.com/t/using-udt-parameters-in-alarms-expressions/14095 "2017-04-20T16:52:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![john.furby](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@john.furby](https://forum.inductiveautomation.com/u/john.furby)\
**Post date:** [April 20, 2017, 4:52pm UTC](https://forum.inductiveautomation.com/t/using-udt-parameters-in-alarms-expressions/14095/1 "2017-04-20T16:52:35Z")

</div>

I cannot get my UDT parameters to work in an alarm expression. I believe the problem is with both Display Path and Custom Message. My work around with a Custom Message was to not make an expression, but just put the references in the field like I was typing static text. Display Path will show a UDT parameter if I select that option, but if I try to insert it in the expression, I get an error. What’s weird is that it will work with a default parameter.

Here’s what I’ve tried:  
Error: {FuncDesc} + " - " + {[.]HourSPT} + “hours”  
Error: concat({FuncDesc}," - “,{[.]HourSPT},“hours”)  
No Error: concat({InstanceName},” - ",{[.]HourSPT},“hours”)  
No Error: {InstanceName} + " - " + {[.]HourSPT} + “hours”

Error message: displayPath Syntax Error on Token: ‘LONG CONST’ (Line 1 , Char 7) ERROR

My UDT is in UDT which is in UDT.

What am I missing here? Is this a known issue or a me issue?

Please advise. Thanks.

System: 7.8.5

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 20, 2017, 6:43pm UTC](https://forum.inductiveautomation.com/t/using-udt-parameters-in-alarms-expressions/14095/2 "2017-04-20T18:43:17Z")

</div>

Try putting the UDT parameters inside double quotes, as in:

```auto
"{FuncDesc} - " + {[.]HourSPT} + " hours"

```

UDT (and alarm) parameters in expressions are evaluated in a different order than property or tag bindings, so they need to be inside actual strings.

---

<div class="post-metadata">

**Author:** ![john.furby](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@john.furby](https://forum.inductiveautomation.com/u/john.furby)\
**Post date:** [April 20, 2017, 10:04pm UTC](https://forum.inductiveautomation.com/t/using-udt-parameters-in-alarms-expressions/14095/3 "2017-04-20T22:04:16Z")

</div>

Excellent! That worked. I did see that option on other posts and I did try it, but I assumed I did not see the error anymore simply because it was now a string. I also did not have a high confidence since {InstanceName} was fine.

Very odd way of having to configure it, but at least now it works. Thanks a lot Griffith!

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [April 21, 2017, 6:05am UTC](https://forum.inductiveautomation.com/t/using-udt-parameters-in-alarms-expressions/14095/4 "2017-04-21T06:05:55Z")

</div>

Was just struggling with this today! Very frustrating that some parameters need quotes and others don’t. Need better documentation on what needs what and why.

---

<div class="post-metadata">

**Author:** ![Paul.Scott](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.scott/32/4578_2.png) [@Paul.Scott](https://forum.inductiveautomation.com/u/Paul.Scott)\
**Post date:** [April 21, 2017, 6:10am UTC](https://forum.inductiveautomation.com/t/using-udt-parameters-in-alarms-expressions/14095/5 "2017-04-21T06:10:39Z")

</div>

Agreed, it can be confusing, but the main culprit are UDT parameters: long story short, if the reference is a UDT parameter, wrap it in quotes, regardless of datatype.

As for documentation, we actually have a page covering this, but it sounds like it isn’t easy to find…we’ll have to improve that: [https://docs.inductiveautomation.com/display/DOC79/Data+Type+Parameters+in+Expressions](https://docs.inductiveautomation.com/display/DOC79/Data+Type+Parameters+in+Expressions)

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [April 21, 2017, 6:15am UTC](https://forum.inductiveautomation.com/t/using-udt-parameters-in-alarms-expressions/14095/6 "2017-04-21T06:15:14Z")

</div>

Ah that is a good page! Don’t think i’ve ever come across it before though.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [July 11, 2017, 11:24am UTC](https://forum.inductiveautomation.com/t/using-udt-parameters-in-alarms-expressions/14095/7 "2017-07-11T11:24:53Z")

</div>

In 7.9.4-beta1, in alarm Associated Data, expression or binding to UDT String parameter are replaced by the **value** of the parameter instead of **{myParameter}** when applying the change in the Data type Strcuture configuration !??? 🤔

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/185e269ef0a9fc4799c1df4e8218aea1a9630c25.jpg)

After Apply:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/f13d9add84d3061daf65418b351eedbf079c9bdc.jpg)

@Paul.Scott is it the expected behavior for expression in associated data???

---

<div class="post-metadata">

**Author:** ![Paul.Scott](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.scott/32/4578_2.png) [@Paul.Scott](https://forum.inductiveautomation.com/u/Paul.Scott)\
**Post date:** [July 12, 2017, 11:40pm UTC](https://forum.inductiveautomation.com/t/using-udt-parameters-in-alarms-expressions/14095/8 "2017-07-12T23:40:59Z")

</div>

@mazeyrat That doesn’t look quite right. I’ll notify QA here so we can take a look.
