For a field with a formula set is it possible to d...
# suitescript
d
For a field with a formula set is it possible to do a if statement?
Copy code
if {someField} != 0:
    do this
else:
   do something else
m
Use an oracle
CASE
or
DECODE
CASE WHEN {somefield} != 0 THEN ... ELSE ... END
d
@michoel Do you know if it is possible to do nested cases?
d
@David Durst, yes you can. e.g:
Copy code
CASE WHEN {somefield} != 0 THEN
    CASE WHEN {somefield} > 0 THEN 'positive' ELSE 'negative' END
ELSE 'zero' END
d
This formula thing would be sooo much easier if you could just write it in SS vs. SQL