I am trying to change the name of type = invoice o...
# general
o
I am trying to change the name of type = invoice on the results from "invoice" to "Order" but my formula keeps getting an error....any ideas...this is what i am using... Case When {type}='invoice' THEN {type} ='Order' end
s
You have no
else
and
invoice
is not capitalized so it's not going to match. And you are assigning a value to
{type}
, you cannot do that.
CASE WHEN {type}='Invoice' THEN 'Order' ELSE {type} END
o
that worded but failed when i added credit memos also
CASE WHEN {type}='Invoice' THEN 'Order' When {type}="Credit Memo" THEN {type}='Refund' ELSE {type} END
actually i got it, a few mishaps here and there lol
e
make sure your second When is capitalized as well
o
i got it to work...this is how it is CASE WHEN {type}='Invoice' THEN 'Order' WHEN {type}='Cash Sale' THEN 'Order' When {type}='Credit Memo' THEN 'Refund' ELSE {type} END