Hey I am trying to apply if statement for below condition but I am getting error as Malformed If statement . Please help me .
Condition : For posting key = 01 to 19 assign line item 1 . For posting key 40 or 50, assign line item 2..
IF ([BSCHL]) >= 01 and ([BSCHL]) <= 19 THEN "Item 1" ELSE IF ([BSCHL]) = 40 or ([BSCHL]) = 50 THEN "Item 2"
else "Null"
ENDIF
Solved! Go to Solution.
Hi @swethav ,
replace "Null" with Null(). The result field is of data type Fixed Decimal, "Null" is a string, so you should use Nul() insteadt.
Let me know if it works for you.
Best,
Roland
Hi @swethav ,
You need to change ELSE IF to ELSEIF
IF ([BSCHL]) >= 01 and ([BSCHL]) <= 19 THEN "Item 1" ELSEIF ([BSCHL]) = 40 or ([BSCHL]) = 50 THEN "Item 2"
else "Null"
ENDIF