T_lastname
T_lastname

Reputation: 122

CASE statement with a formula as the True or False

Hey I'm trying to create a Formula(Numeric) result on a saved search within Netsuite. I want the case to be true when the transaction type is 'creditmemo', and false otherwise. If true, I want to multiply the value by a -1. Is this possible? I've found examples of CASE statements, and I can do the normal numeric formula where you perform an operation on the result always, but I'm struggling to combine the 2. Are there any good comprehensive guides online I've missed? Thanks!

Upvotes: 0

Views: 709

Answers (1)

W.S.
W.S.

Reputation: 1505

Use it like:

CASE {type} WHEN 'Credit Memo' THEN -1*{amount} ELSE {amount} END

or simply:

CASE {type} WHEN 'Credit Memo' THEN -{amount} ELSE {amount} END

Upvotes: 1

Related Questions