Rules: Is there a null-value function like in SQL?

just a general question: Is there a “nvl” function like in SQL/PLSQL available for OH rules?


var x = "column 1"
if (something or other === null) {
    x = "column 2"

There’s other arrangements for the same kind of thing.

1 Like

One of the other arrangements is the ternary operator.

In Rules DSL:

if(condition) val1 else val2

In other languages (including JavaScript) the more terse syntax is

(condition) ? val1 : val2

When the condition is true, val1 is returned, otherwise val2 is returned.