Search code examples
xpageslotus-domino

How to set minFractionDigits/maxFractionDigits for view column globally?


Our Xpage application calculates and stores foreign exchange calculations with large numbers.

Data stored in database is correct with all integer and fraction digits accounted for but when displaying in viewPanel the values are rounded to a default of three fraction digits.

How can I set this on a global basis so I won't have to change this on all views, all columns?

Example:
Value with default Number/decimal settings: 2016.667
Value with maxFractionDigits = 6: 2016.6667
When calculating large quantities of foreign exchange transactions this small rounding can result in a large amount of money…

Our customers have different needs, some would like 6 fraction digits, some 8…

We are using Domino 9.0.1 FP2…

I have asked a similar question on how the default value of fraction digits is determined but with no luck. This is a rephrase with a more specific needs and explanations…


Solution

  • Probably the cleanest option is to use a Converter that picks up the number of decimal places from a keyword or some other config document. Here's an example of a system-wide converter I set up to configure the date format http://openntf.org/XSnippets.nsf/snippet.xsp?id=date-converter