Table of Contents

Article

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:

  1. Copy the standard HTML Property rule named CurrencyAmount. Use Save As to create a new rule with a new name.
  2. Enter the following Java into your HTML Property rule.

saveValueSet("result", PRNumberFormat.format(null, PRNumberFormat.DEFAULT_CURRENCY, true, null, value ));

  1. Update any property rules that are to use this format to reference the new HTML property rule.

Tags:

Published May 19, 2005 — Updated November 15, 2015


0% found this useful

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.