1 Reply Latest reply on Mar 12, 2020 7:23 AM by Martin Vollrathson

    Global picture clause or detailed locale setting

    Martin Vollrathson New Member

      We would like to modify the display of all decimal numbers in the system.

       

      Particularly the need has arisen around Attribute Values but they can't easily be modified using picture clause in the repository, as they are of a special type that can contain different data types.

       

      Is there a way to modify the global locale, only with respect to number format? For example, en_US is used as base locale but only number format is either borrowed from a different locale.

       

      Our goal is to get rid of the comma that divides large numbers into groups of 3 digits. On any normal numeric field, that could be achieved using picture clause but A. this doesn't seem to be possible for attribute values and B. if we don't want grouping commas in general, it seems more efficient if we could change the "global" default.

        • 1. Re: Global picture clause or detailed locale setting
          Martin Vollrathson New Member

          I found a solution that appears to solve this problem, exactly as desired - making decimal fields entirely locale-agnostic.

           

          I contributed a new class to the extension point com.heiler.ppm.commons.externalFormatters for the srcClass java.math.BigDecimal, that does very simple formatting (and parsing) of decimal values without locale, just using BigDecimal.toPlainString().

           

          If there could be any pitfalls to this approach, please let me know.