Hi All, I need help in writing out a syntax for a IF THEN ELSE statement. I have below formula that is currently in a Alteryx work and wanted to know what would be equivalent in Knime.

Basically what the formula is doing is replacing a COST field depending on a specific billing type. So where ever it matches that specific billing it overwrites the COST field to 0. Thank you in advance.
IF [Billing Type] = ‘G2’ THEN 0
ELSEIF [Billing Type] = ‘ZG2’ THEN 0
ELSEIF [Billing Type] = ‘ZL2’ THEN 0
ELSEIF [Billing Type] = ‘IG’ THEN 0
Elseif [Billing Type] = ‘L2’ THEN 0
ELSE [Cost] ENDIF

I tried the column expressions but I can’t figure out the correct syntax. This is what I have currently have which doesn’t work. Is there an ELSEIF function in Knime?
IF (column(“Billing Type”) = “G2”)
{ 0 }
Else
(column(“Billing Type”) = “L2”)
{ 0 }
Else
(column(“Cost”))

Thank you everyone. The below formula worked. I need to remember that the function needs to be in lower case if vs If or IF
if (column(“billing_type”) == “G2”)
{ 0 }
else if (column(“billing_type”) == “ZG2”)
{ 0 }
else if (column(“billing_type”) == “ZL2”)
{ 0 }
else if (column(“billing_type”) == “IG”)
{ 0 }
else if (column(“billing_type”) == “L2”)
{ 0 }
else
{ column(“cost”) }

I WOULD use the rule engine node I.O the column expression.
its more intuitive to me .
Not sure why but the sementic the column expression node differs from the rest of the native nodes. which is quite confusing if you are giving the first steps.
Also, when you open the node Rule engine You will see a comment explaining the logic.