Issue
Properties populated through a Declare Expression do not display the expected values when accessed through a List View Data Page sourced from a Report Definition.
Symptoms and Impact
- Declare Expression values display as blank or outdated in the Data Page results.
- The Declare Expression property may display the correct value when accessed directly from the case processing.
- The reported behavior occurs when data is retrieved through a List Data Page sourced by a Report Definition.
Steps to reproduce
- Create a List View.
- Configure the List view as a table.
- Source the List view from a List Data page.
- Configure the List Data page to use a Report Definition as its data source.
- Add Declare expression property as a column in the table.
Root Cause
This behavior occurs because Report Definitions do not trigger forward chaining. Instead, they evaluate Declare Expressions using backward chaining.
When a property calculated through a Declare Expression is referenced in a Report Definition, the expression may not be evaluated unless it is configured to support backward chaining.
When using data pages sourced from Report Definitions in Pega Platform, declare expressions do not evaluate correctly by default because Report Definitions use backward chaining instead of forward chaining. This causes fields calculated through declare expressions to display incorrect values, such as zero.
Solution
For properties used in a List View Data Page sourced from a Report Definition, the Declare Expression should be configured as follows:
- Enable the Legacy Expression option from the Actions menu of the Declare Expression Property rule.
- Update the Calculate Value field to Whenever used in the Change Tracking tab in the Declare Expression Property rule.
This configuration makes sure that the Declare Expression is evaluated whenever the property is referenced by the Report Definition. Since Report Definitions use backward chaining rather than forward chaining, enabling Whenever Used allows the property value to be calculated and returned correctly in the Data Page results.