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.
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
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.
- Apply HFix-45797
- Apply HFix-46202