Adding a new value formatter

The base configuration of PolicyCenter provides formatters for currency, numbers, jurisdictions, age, units, and U.S. dollars. PolicyCenter even provides a formatter that does not format the data. If the formatter you need is not provided in the default configuration, you can add new value formatters. You can also modify the existing value formatters.

In the base configuration, the values are:

Value

In UI

Description

Age

Formats the value as an age followed by the abbreviation yrs.

Currency

Formats the value as the currency associated with the current locale.

Integer

Formats the value as an integer.

MonetaryAmount

Formats the value as a MonetaryAmount, which contains a value and a currency.

Number

Formats the value as a BigDecimal.

StateSet

Formats the value as a jurisdiction.

USD

Formats the value as a U.S. dollar (with cents).

USDBrief

Formats the value as a U.S. dollar (without cents).

Unformatted

Does not format the value.

Units

Formats the value as an integer followed by the word units.

TestFormatter

Used only for testing.

The In UI column indicates values that appear in Rule screen of the base configuration. If you add hidden values such as Currency, PolicyCenter supports those values without further configuration.

The value formatter type corresponds to the UWIssueType.ValueFormatterType property.

The ValueFormatterType typelist defines these values. The code is the same as the value or name. The formatter types allow the presentation of values in a localizable and consistent manner in the user interface. Only output uses formatters. You can configure formatters to meet a wide range of output needs.

See also