Any insight in creating a CASE WHEN formula and th...
# administration
m
Any insight in creating a CASE WHEN formula and the field I am trying to dictate the formula on is not always present on a line item?
CASE WHEN {field} is not present THEN x ELSE y END
IS NULL doesn't work, IS '' doesn't work. NVL threw error.
j
are x and y of different types? you might need to convert
m
CASE WHEN {custcol_ns_acs_track_img_url} = NULL THEN '' ELSE '<img src="'||{custcol_ns_acs_track_img_url}||'" width="100" height="100">' END
the case when field is simply an ACS line item field with a url which may or may not be present.
j
You should be using IS NULL rather than = NULL Does the formula return errors if you just go
Copy code
CASE WHEN {custcol_ns_acs_track_img_url} IS NULL THEN '' ELSE {custcol_ns_acs_track_img_url} END
?
m
No errors. I also get no errors if it is simply that field.
Copy code
{custcol_ns_acs_track_img_url}
Wait - I am an idiot.
IS NULL fixed it.
Why did I put = NULL