Issue
In Pega Customer Service™ 25.1.3, when a Verbatim Paragraph contains a dynamic reference to a property that uses a Currency or Decimal control, trailing zeros in the decimal portion are dropped at runtime.
Symptoms and Impact
A value entered as 45.50 is displayed as 45.5 in the Verbatim. Static text within the same Verbatim Paragraph is displayed exactly as authored. Properties that use a Text Input control are not affected.
Steps to reproduce
- Configure a Verbatim Paragraph that contains both static text and a dynamic reference to a Currency property.
- Confirm that the referenced property uses a Currency control.
- Launch the interaction or service case and enter a value with a trailing zero — for example, 45.50.
- Observe the Verbatim at runtime: the dynamic value is displayed as 45.5, while the static text is unchanged.
Root Cause
This is by design. The Currency and Decimal controls strip insignificant trailing zeros when resolving a property value for use in a Verbatim Paragraph. A Text Input control does not apply this formatting, so trailing zeros are preserved when that control is used instead.
Solution
To preserve a fixed number of decimal places in a Verbatim Paragraph while retaining the Currency control, pre-format the property value in the Initiate_Service_Ext Data Transform in the Service-Work class, using the pxFormatNumber function from the Pega-UIEngine:Formatter library. This approach lets you control decimal precision per property.
To configure per-property decimal precision:
-
Open the Initiate_Service_Ext Data Transform in the Service-Work class.
-
Add a Set step for each property whose decimal precision must be controlled in the Verbatim.
-
Set the target property using pxFormatNumber, passing the required number of decimal places as the fourth parameter. For example:
@(Pega-UIEngine:Formatter).pxFormatNumber(.ServiceAccount.CurrentBalanceAmount,".",true,2,"","","","","")
@(Pega-UIEngine:Formatter).pxFormatNumber(.ServiceAccount.CurrentDueAmount,".",true,4,"","","","","")
The fourth parameter controls the number of digits displayed after the decimal point. In the first example, 2 ensures the value is displayed as 45.50. Adjust this value for each property as needed.

-
Save the Data Transform and confirm that the Verbatim Paragraph references the same property.

