Rule engine IF statement convert into Column expression

Rule Engine Statement:
$ABS USD$ >= 10 => “Y”
TRUE=> “N”

Column Expression
If (column(“ABS USD”) >0 && column(“ABS USD”) ==10)
{Y}
ELSE
{N}

No error, when i evaluate the column expression. but when i execute the node :ERROR Column Expressions 3:103 Execute failed: (“NullPointerException”): null

The Column Expressions Node uses JavaScript syntax:

  • if/else should be all lowercase
  • semicolons at the end of statements aren’t required, but should be used
  • strings have to be quoted

Additionally, the test can be simplified. This works:

if (column("ABS USD") >= 10) {
    "Y";
}
else {
    "N";
}

Unbenannt

5 Likes

Hi @Thyme i understand now. thank you!

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.