Precision and scale

The number of digits stored in database columns with a monetaryamount data type is controlled by two settings: precision and scale. Precision is the setting that controls the total number of digits of the value stored. Scale is the setting that controls the number of digits to the right of the decimal symbol. For example, if precision is set to 5 and scale is set to 2, then the maximum value that can be stored for a monetaryamount is 999.99 and the minimum value is -999.99.

Guidewire recommends that you set the scale to the maximum number of digits that you would possibly need in the future. Setting scale to an initially large value makes it easier to add currencies that require more digits than the currencies supported by your initial configuration.

The scale attribute also specifies the default number of digits that are shown in the user interface after the decimal symbol. When multicurrency is enabled, you can provide currency-specific values that override this default.

See also

Set the precision and scale

About this task

Important: When you integrate the core applications in Guidewire InsuranceSuite, Guidewire recommends setting the precision and scale to be the same in each application.

Procedure

  1. In Guidewire Studio™, open the datatypes.xml file either by:
    • Searching for it with Ctrl+Shift+N.
    • Navigating in the Project window to configuration > config > fieldvalidators and double-clicking datatypes.xml.
  2. Search for the <MoneyDataType> element.
  3. Set the precision and scale attributes as needed.
    • You do not need to modify the validator attribute.