Nested braces for udt parameter in expression function not working

Hi everyone,

I have an udt with a parameter that contains the path to a tag. One tag inside the udt checks the quality of that tag.
The problem is that I have to use nested braces - and that doesn’t work.
So it works when I directly use the tag path in my expression like

isGood({[.]../otherFolder/myTag})

But this is not an option as the path changes for different instances of my udt.

And here comes what does not work:
isGood({{parameterWithTagPath}}) with double braces where paramterWithTagPath has the value [.]../otherFolder/myTag gives Error_Configuration:
If I try isGood({parameterWithTagPath}) with single braces and with the same parameter I always get a true, no matter if the tag even exists.
And putting the braces in the parameter so that the expression becomes isGood({parameterWithTagPath}) and the parameter is {[.]../otherFolder/myTag} also always gives true, whether the tag inside the braces exists or not.

Any idea how to solve this problem?

I'm confused why you have to use nested braces?

Try wrapping tag() around the dynamic tag path;

isGood(tag({parameterWithTagPath}))
1 Like

The inner set to read the value of the tag holding the tag path, and the outer to read the value of the resulting tag path :slight_smile: of course, this can't be done and you need to use tag as you mentioned

1 Like

Thank you so much. That works!

1 Like