Setting Quality on an Expression Tag

Hi,
I am trying to set the quality of an expression tag that uses the runscript expression function without success, getting the following error: Nesting qualified values.


How to return a qualified value with the runscript expression function?
Thanks in advance!

You could wrap the return value in a forceQuality expression to set the desired quality?

Hi Paul, The quality is calculated in the expression( dynamic, in the example it was constant for testing purposes) how to expose/use the calculated quality value in the expression with the forcequality function?
Thanks

Hmm, that’s a good question. The expression language is unfortunately bad at dealing with multiple return values…
I do see what needs to be fixed on our side in the code, but I don’t see any immediately obvious workarounds. I’m going to file a ticket to fix things, but keep thinking about a possible solution.

It’s far from ideal, but you could have your project script write the return value and a quality code integer back to two tags in your UDT (manually, via system.tag.write) then make a new expression tag that collates them together via forceQuality

1 Like