How to format amounts with commas
Summary
An application needs to format amount data with commas like 9,000,000. These are primarily Decimal
properties.
Is there a way to handle this requirement?
Suggested Approach
Follow these steps:
- Copy the standard HTML Property rule named CurrencyAmount. Use Save As to create a new rule with a new name.
- Enter the following Java into your HTML Property rule.
saveValueSet("result", PRNumberFormat.format(null, PRNumberFormat.DEFAULT_CURRENCY, true, null, value ));
- Update any property rules that are to use this format to reference the new HTML property rule.