Ignoring Bad Tags in an Expression

I have an expression tag which I want to be the minimum time left in cycle for a group of ovens. I am using the “min” function on a group of “if” statements that each test if an oven is in cycle and return either Null of the cycle time. That all works well, until…

But when I try to include an oven that is currently powered down (with all bad quality tags) the expression result is also bad. I need to be able to test if the oven tag is bad and if so, just put a Null in the “min” expression. However I am failing at this task. I tried testing with “isGood” but even that caused a bad expression quality.

I’m hoping I am missing something obvious.

1 Like

You missed the forceQuality expression function…

I did miss it, but I am sure I understand how to apply it. I do want to react to the bad quality (put a Null in my minimum calculation). If I use whatever value is left in the tag, I could erroneously include a cycle time that is old/stale.

Use both isGood() and forceQuality() in your logic.

Thanks for your help. I suspect I was doing something wrong elsewhere in the expression as it works fine now with “isGood”. I can’t reproduce my initial error.