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

pyDecimalPrecision Qualifier applied on Property not working



Decimal type property is configured such that the qualifier for pyDecimalPrecision = 2. 
On inputting a decimal value, the value is rounded off to two decimal places after a Save or a Submit. However, the qualifier does not restrict the user to input only two decimal places.

Error Messages

Not Applicable

Steps to Reproduce

  1. Create a decimal type property.
  2. Set the qualifier for pyDecimalPrecision = 2
  3. Enter a decimal value with more than two decimal places for the property.

Root Cause

This behavior is as per Pega product design.
The functionality of the pyDecimalPrecision qualifier is to round off the decimal value to the set number of decimal places. The qualifier is not designed to restrict the input which is not according to the number of set decimal places.


Perform the following local-change:
  1. Add the below script in the UserWorkForm.

    $('#DecimalProp2').on('input', function () {
            this.value = this.value.match(/^\d+\.?\d{0,2}/);

  2. Add the element ID of the property instead of DecimalProp2.

Published April 5, 2019 - 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