Declare expressions recalculates but does not refresh
Declare expression recalculates; however, it does not refresh on the screen if the property is referred in a dynamic layout header. The values are updated in the Clipboard; however, the section does not display the updated values.
Steps to Reproduce
- Create two properties, Prop1 and Prop2.
- Create a declare expression on Prop1 such that when Prop2 value changes, the same value must be set to Prop1 as well.
- Create a dynamic layout and refer Prop1 in the container setting Title and Prop2 in the section to enter the value at runtime.
- Run the flow.
- Enter some values for Prop2. In the Clipboard, Prop1 is updated with Prop2 value. However, the container title Prop1 field does not refresh with the updated value.
A defect in Pegasystems’ code or rules.
Declaration expression on Header layout is not implemented as yet. Declare expressions are supported only for controls.
Below is the working mechanism for declare expressions:
If any control is configured with a property which is the target in the declare expression, it is rendered as read only (Mark up: <p id="CV" name="$PpyWorkPage$pProp1" rhp_name="pxTextInput " data-ctl="" data-ctlformat="NF" class="leftJustifyStyle">ghvghv</p>).
When the value in the declare expression source changes, all the HTML elements are obtained with 'CV' ID. Based on the property name, the decalare expression is evaluated to update the value in the target markup.
In this use case, dynamic layout header is generated with the Header tag (such as, <h1></h1>, <h2></h2>,<h3></h3>..).
The markup does not have ID='CV'.
Perform either of the following local-changes:
- Drop any control in the dynamic layout header and provide the property.
- Configure the source property with an OnChange refresh section.
An enhancement request, FDBK-28543, has been created for consideration by Pega Product Management.
100% found this useful