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

Declare expression behavior incorrect



The Date control field with display mode is present as drop-down lists. A declare expression is created for calculating the age when the input changes. When the Date control field display mode is present as drop-down lists for the first time, the declare expression does not calculate the age on changing the Date field value. The declare expression works fine later. The declare expression fires every time on changing the display mode to textinput + calendar.

Error Messages

Not Applicable

Steps to Reproduce

1. Create a property 'DateOfBirth' with the date control, on the presentation set Display Mode Dropdown lists
2. Create a property 'Age' with the text control that holds the calculated age from the DateOfBirth field
3. Create a Declare expression with whenever changed and set age property. Calculation must be made using the DateOfBirth field
4. Change the value of the DateOfBirth field after running the case. The age is not calculated and is not present on the screen
5. Change the value of the date of birth. The age is calculated now

Root Cause

A defect in Pegasystems’ code or rules. When the date was selected for the first time the hidden input did not have onchange handler trigger calculateExpressions. The validation function was attached when the date was selected for the first time. However, it worked later.


  1. Apply HFix-45797
  2. Apply HFix-46202


Published May 7, 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