CASE WHEN {currency} is CAD THEN {customer.balance...
# general
a
CASE WHEN {currency} is CAD THEN {customer.balance} ELSE {{customer.balance}}/{exchangerate} END can this sort of a statement be used??
k
probably requires a bit of work and troubleshooting, but something like that could probably be done
should note - that the main concept is flawed though.
the primary issue you're going to encounter is "what" exchange rate you use - if you use the transaction exchange rate, it's not a reflection of the current date and what is outstanding.
a
@KevinJ of Kansas thanks - I am able to work the logic with the exchange rate by itself. however when I add the statement it says invalid expression.
k
wrap your "CAD" in single quotes
you also might want to dump the currency field in a formula text to see what it spits out.
a
thanks for the ideas @KevinJ of Kansas. this is what worked
CASE
WHEN {currency} = 'CAD'
THEN {customer.balance}
ELSE {customer.balance}/NULLIF({exchangerate}, 0)
END