Displaying a negative dollar amount

1
There doesn’t appear to be any way to format a decimal as currency in a text field, so I had to add extra logic before showing my data. I added a second STRING field and then concatenated the “$” sign to the amount. It’s annoying, but it works. The problem is that if I want a negative amount, the proper format (in the USA at least) is “-$1.50”. However if you just append the amount to the “$” you end up with “$-1.50". The symbol comes before the the minus sign which is not the professional way to display it. Is there any better way of dealing with currency?    The only other way is to add even MORE complex logic to my string value that checks if the value is negative, and if so, multiple to -1 to make it positive, then add the “$” to the front and THEN add the minus sign before that. it seems like a crazy amount of steps to simply show a dollar amount
asked
1 answers
1

Hi Brian,

 

Did you try the formatDecimal() function?

I tried using the exact formatstring from the documentation and it looks exactly like how you seem to want it:

formatDecimal(1234.56, '¤ #,##0.00')

 

If I fill in -1234.56 it will show up as -$ 1,234.56

answered