Am I missing something or is there a bug in “expression” component? I want to evaluate list of numbers a and return 0 if a==0 or r/a in other cases. But the expression tries to divide by 0 even tho I get rid of it using condition.
When I use regular components, it works just as expected.
The If() statement in the expression language is a function rather than a true conditional statement. Meaning both the TRUE and the FALSE values must be computed when it is called.
At the moment the only way around this would be to add a Max function into the FALSE argument: If(a=0, 0, r / Max(a, 1))