CASE statement has single WHEN. Could be replaced by an IF statement (WMB)
Case statements with only two(2) conditions are essentially “IF” conditions. Use an “IF” condition as it is easier to read.
For example |
CASE Environment.Variables.PersonType WHEN 1 THEN SET Environment.Variables.ItsABoy = ‘TRUE’; SET Environment.Variables.LowerName = lowerType; END CASE; |
Preferred |
IF (Environment.Variables.PersonType = 1) THEN SET Environment.Variables.ItsABoy = ‘TRUE’; SET Environment.Variables.LowerName = lowerType; END IF; |