Skip to Content
0
Former Member
Feb 25, 2014 at 07:05 PM

Concatenate negative sign in CR

34 Views

Hello All,

I have the following formula set up the formula field. I want to concatenate "-" negative sign, if the first condition is true. The following formula gives me an error - A number or currency amount is required here.

numbervar dInvAmount;

if {@fmlCredit}="C" then

+"-"+(dInvAmount:=({InvoiceHeader.TotalInvAmount}-{InvoiceHeader.DepositAmount}-{InvoiceHeader.PostageDepositAmount}) * val({@fmlConvRate}))

else dInvAmount:=({InvoiceHeader.TotalInvAmount}-{InvoiceHeader.DepositAmount}-{InvoiceHeader.PostageDepositAmount}) * val({@fmlConvRate});

dInvAmount;

Thanks,

Amol