cancel
Showing results for 
Search instead for 
Did you mean: 

Concatenate negative sign in CR

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Amol,

An easier way to do is:

1) Get rid of the "-" sign from the above code

2) Right-click the formula field > Format Field > Number tab > Customize > Click the formula button beside 'Reverse Sign for Display" and use this code:

{@fmlCredit}="C"


-Abhilash

abhilash_kumar
Active Contributor
0 Kudos

While in the Customize window, also make sure to change the 'Negatives' from '(123)' to '-123'.

-Abhilash

Answers (1)

Answers (1)

Former Member
0 Kudos

Abilash- It works. Thank you