How/where can I change the decimal notation?

fred_kouwenberg
Giga Contributor

In the April release functionality on decimal notation can be changed.

Has anyone found where can I find or change this functionality?

What I'm looking for is that a decimal field uses a dot-notation as decimal separator instead of a comma-notation.
E.g. I need 12.000 for twelve thousand and not 12,000 and also e.g. Euro 12.000,50 being twelve thousand Euro and 50 cents instead of Euro 12,000.50

Thanks!

Fred K.

6 REPLIES 6

Not applicable

Hi

Funny you should ask this, in the UK with en.GB set as locale I have a "." as a thousand separator, which here is wrong, in the UK we use a "," as a separator.

So I can tell you that if you set your system locale to en.GB you will get what you are after.

I have logged a call about this and am hoping for the fix to be released in tonight's patch.

Thanks
Ben


Not applicable

Depends on your version of the code.

If you're on the older (fall) code base, then you can set a system locale property to something like the previous poster presented e.g. en.GB. This has limited affect though e.g. it changes formatting of prices in the service catalog, but most numeric fields still show up in us standard notation.

As of the spring release, you get two advantage and one potential confusion:

1) Your locale now determines your decimal formatting pretty much throughout the product.
2) You can set a country and language code on your user record (as opposed to using the system default) so that, say, french users can see commas as their decimal separator while us users would see periods (dots).

Potential confusion is that if you fill in a language on your user record, you've indicated that you want a per user locale now (since you have a language) so the system global locale doesn't apply to you anymore.

As for what locales dictate are the grouping and decimal separators and whether or not they're right:

We use the built in localization package for java written by Sun, so if you find that the separators are wrong for a given locale, there isn't a lot we can do to help you other than to try to find an alternate locale that does it right. Fundamentally, we're both dependent on the JVM getting these things right.


Ok, I did some more tests and this is what I found:

1. Changing the system property locale to e.g. de.DE or nl.NL does not 😞 change my behavior for decimal fields to dot vs comma notation. It still presents 12,000 vs the expected 12.000

2. Add the fields Country Code and Language to a user record and e.g. supplying Dutch values (so Country Code = NL; Language = nl) DOES 😄 change my decimal notation to dot-notation

So we can get it to work, but we will have to do it via the user records since the system-wide locale settings doesn't change my decimal notation to the expected one....

Hoping on a reply from Pat here.... 😉

Fred K.


Setting the system wide property should work and, I think, still will, if your users have NO language at all. If you've got a language though (including the default "en") then you get the default locale for that language instead of your system locale.

The fact that setting a language w/o a country code overrides the global system locale property is actually the way the code was supposed to work, but based on end user feedback, it's probably not the way our customers want it to work.

We'll probably be changing the code back to the old behavior for the next release, but for the time being the way to achieve what you want is:

Set a country code and langauge on all your users.

Probably the most convenient way to achieve that is to set the appropriate default values in the dictionary (so all new records get constructed that way). Then do a multiple update to update the users who are already in your system.