What I have written so far, I am not quite sure ab...
# general
w
What I have written so far, I am not quite sure about the AND condition writing
d
You need some kind of value after your else probably. What do you want the result to be if the currency isn't US dollar AND the accounting book isn't secondary book?
b
I don't think ELSE is mandatory, if WHEN statements don't match then the formula returns NULL. But I don't quite follow the THEN statement you have @William Lim, because I don't know if {debitfxamount} = {accountingtransaction.debitount}*{exchangerate} will edit the field {debitfxamount} . Amazing if so, but I think you need to take just "CASE WHEN [what you've written...] THEN {accountingtransaction.debitount}*{exchangerate}" and use that in a workflow to 'Set Field Value' action, or you might be able to paste the whole CASE statement into the {debitfxamount} field itself, depending on what type of field it is.
s
The formula is just malformed, you cant assign a value within a formula.
w
@dmashburn3 If the currency is not USD and and accounting book is not secondary then nothing to do. @Brad Wentworth Actually I would like to multiply the USD debit amount with another currency rate (which is a transaction body field) when the currency (transaction body field) is US Dollar, {debitfxamount} is a field from accounting book where amounts in USD are already input I will try creating a workflow then. @Sandii What do you mean by not assigning a value? Thank you guys for all the feedbacks by the way !!!
@Brad Wentworth I don’t think I’ll be able to work on a workflow since I am working with a sublist
b
@William Lim Can you make the value of the needed field the CASE statement? My understanding is that custom field allow formulas, though I've never actually tried it myself
s
@William Lim I am confused what the intent of
{debitfxamount} = {accountingtransaction.debitamount} * {exchangerate}
is. It kinda looks like you are trying to set the value of
debitfxamount
, which you cannot do. If you just want that math returned, then remove the part to the left of
=
. To what dmashburn3 said, you need the ELSE to return something or it is a malformed equation.
w
@Sandii My goal is to set the current amount based on another currency rate that is why I put =. I will try to compute {debitfxamount} without = and btw, {debitfxamount} already displays a value which is auto generated (=debit amount in foreign currency), @Brad Wentworth Can you explain the part ‘make the value of the needed field’?
s
You cant set the amount of anything within a saved search.
If the value of whatever is already in that field doesn't matter, then it should not be part of your CASE WHEN
w
Ok! I understand, thanks a lot