Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Negative sign for 0.00 disappear after upgrade

SA-38673

Summary



User has upgraded the UAT system from Pega 7.1.8 to Pega 7.2.2. and they noticed that in a screen with a numeric field input initialized to "-0.00" deliberately, when the user positions the cursor inside the field, on Pega 7.1.8, the negative sign will appear to remind the user that the field only accepts negative amount.

On Pega 7.2.2, the negative sign disappear, hence the visual prompt for negative amount is lost.


Error Messages



Not Applicable


Steps to Reproduce



1. Add a decimal field that is initialized to -0.00.
2. Run the usecase in Pega 7.2.2. The "-" sign disappears.


Root Cause



This issue is seen only when user gives a minus sign for zero.

In the Out-of-the-box (OOTB) logic, Pega converts the string value given by user to a number.

When property value is given as -0.00,since -0.00 is not a valid number and 0.00 is valid, Pega displays 0.00.

If a valid negative number say -1.23 is entered by the user,it is shown properly. Minus sign will not truncated.

In Pega 7.1.8, -0.00 is shown as -0.00 because of a bug which got fixed in later release of the product.


Resolution



Perform the following local-change:

Add an event focus to the text input,configure runscript action and specify a function "SetInputValue" and pass event object to it.

In userworkform, add the following function code:

function sampleFunc(event){
var target = event.target;
var value = target.value;
if(value == 0.00){
target.value = "-"+"0.00";
}
}

Published July 5, 2017 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us