I’m wondering how to change the look of a negative currency data value in my Connect template. The default formatting will use parenthesis for a negative value, but the end user wants to be able to change this because the extra character throws off the decimal alignment of the column. Can I/Should I use CSS or the Replace method in a javascript to achieve this?
Ultimately, its the decimal alignment that is desired, so perhaps there is a way to achieve that instead of worrying about the currency formatting?
There are 2 things to keep in mind when it comes to adding locale-aware date to the document (may it be date, time, or currency).
First, go to Edit, Locale. This dialog sets the actual locale used to output, and this is the same concept as the locale in the OS. If you choose en_FR, for example, a short date would be mm/dd/yyyy. In en_GB, it’ll be dd/mm/yyyy. Currency will use the locale’s currency sign and config (aka, $1,000.00 or £1000.00) to display them.
Second, double-click on the script that adds the data to the page. Here, you have the “Format” column with a drop-down that changes dependant on the type. Dates have short, medium and long date, and currency has with/without signs.
With these two options, you should definitely be able to get to where you want. If not, a little bit of scripting may be required to manually print out the date… but I doubt it’s impossible to have a negative without parenthesis. There has to be one of the locales that’s set up with actual negative signs.