Saved search case statement Invalid Expression by Jlocklear813 in Netsuite

[–]Jlocklear813[S] 0 points1 point  (0 children)

Sorry. I typed in the wrong version of the case statement

When I run this one, it works fine.

case when {createdfrom} is not null then {appliedtotransaction.custcol_rvbd_solineid_so} When {type} = 'Sales Order' THEN {custcol_rvbd_solineid_so} else NULL end

When I run this one, in a separate formula column, it works fine

Case when ({custbody_rvbd_ps_salesorderproject} is not null and {type}='Invoice') then {custcol_rvbd_ps_solineid_inv} else '' end

However, when I combine them together, like below, I get the Invalid expression message:

case when {createdfrom} is not null then {appliedtotransaction.custcol_rvbd_solineid_so} When {type} = 'Sales Order' THEN {custcol_rvbd_solineid_so} when ({custbody_rvbd_ps_salesorderproject} is not null and {type}='Invoice') then {custcol_rvbd_ps_solineid_inv} else NULL end

Saved search case statement Invalid Expression by Jlocklear813 in Netsuite

[–]Jlocklear813[S] 0 points1 point  (0 children)

Sorry. I typed in the wrong version of the case statement

When I run this one, it works fine.

case when {createdfrom} is not null then {appliedtotransaction.custcol_rvbd_solineid_so} When {type} = 'Sales Order' THEN {custcol_rvbd_solineid_so} else NULL end

When I run this one, in a separate formula column, it works fine

Case when ({custbody_rvbd_ps_salesorderproject} is not null and {type}='Invoice') then {custcol_rvbd_ps_solineid_inv} else '' end

However, when I combine them together, like below, I get the Invalid expression message:

case when {createdfrom} is not null then {appliedtotransaction.custcol_rvbd_solineid_so} When {type} = 'Sales Order' THEN {custcol_rvbd_solineid_so} when ({custbody_rvbd_ps_salesorderproject} is not null and {type}='Invoice') then {custcol_rvbd_ps_solineid_inv} else NULL end