...
if OPTION_TYPE = NULL (undefined) then the string is interpreted as an empty string "", so the COEF_OPTION will still be 0 (and not NaN).
This method is possible since FEWS 2014.01
Code Block | ||||
---|---|---|---|---|
| ||||
<variable> <variableId>X</variableId> .... </variable> <variable> <variableId>Y</variableId> .... </variable> <transformation id="user simple with boolean coefficient test"> <user> <simple> <expression>IF(COEF_OPTION == 1, X, Y)</expression> <coefficientSetFunctions> <coefficient id="COEF_OPTION" value="@OPTION_TYPE@=="hard""/> <coefficientSetFunctions> <outputVariable> <variableId>Y</variableId> </outputVariable> </simple> </user> </transformation> |
...