UDT parameters in expression binding option of the display path of an alarm

Hi
When I want to use UDT parameters in expression binding option of the display path of an alarm, expression doesn’t work correctly and display path get its default value.
for example i\I write something like this:
replace({PathToTag},’/’,’:’)+ ‘->HiHi’
anything other than UDT parameters in expression works fine.
Is there a bug or I did something wrong?
I use v7.9.10

UDT parameters are treated as string substitutions before your expression is executed. Quote them. (This changes in v8, btw.)

3 Likes

Thanks Phil. You save me.

Hi,
I am having similar problems again, this always gets me..
I'm trying to bind to the isActive property of an alarm. I am trying to do the following:

{[.]HiHiAlmEnb} & ({[.]In} > {AlmHiHiValue}

Where first two items are boolean tags part of the UDT, and the last item is a UDT Parameter.
The gateway console log says it is evaluating as:

(prov:default:/tag:Bakels/Mount Maunganui/Refinery/Common/Devices/AnalogIn/M3TT000103/In:/alm:AlarmHiHi) Error compiling bound property 'activeCondition', with value '{[.]HiHiAlmEnb} & ({[.]In} > 95.0'.

I've tried a few different combinations of the quotes but still can't get it to work.

Hi
just quote them.
for examle:
replace(’{PathToParentFolder}’,‘PU’,‘PUMP’)+’->LoLo’
As you see I use ‘{PathToParentFolder}’ to access it in expression.
try this:
‘{[.]HiHiAlmEnb}’ & (’{[.]In}’ > ‘{AlmHiHiValue}’

These aren’t STRING properties though so it doesn’t work.
I found this manual entry but it mainly talks about string parameters and string tags.
https://docs.inductiveautomation.com/display/DOC79/Data+Type+Parameters+in+Expressions

putting quotes around the tag references just shows the literal result:
(prov:default:/tag:Bakels/Mount Maunganui/Refinery/Common/Devices/AnalogIn/M3TT000103/In:/alm:AlarmHiHi) Error compiling bound property 'activeCondition', with value '{[.]HiHiAlmEnb} & ({[.]In} > 95.0'.