Cannot see the declare expression property in child clipboard (26.1)

I have a property .Percentage (example) defined in the ABC-APP-Work class, which is shared by both Parent and Child case types.

For the Parent case type:

  • I created a Declare Expression in ABC-APP-Work-Parent targeting this property.
  • The property is configured in the summary panel.
  • The value is calculated correctly and the property is visible on the pyWorkPage clipboard.

For the Child case type:

  • I created a separate Declare Expression in ABC-APP-Work-Child for the same target property.
  • The calculation logic and source properties are different from the Parent case.
  • The property is also configured in the Child summary panel.
  • The value is calculated correctly and displayed in the UI.

When inspecting the clipboard:

  • The target property is present on pyWorkPage for the Parent case.
  • The target property does not exist on pyWorkPage for the Child case.
  • But the correct calculated value is still displayed in the Child case UI.

I need this value in clipboard bcs i have to retrive the data uisng report.

Hi,
Anyone can suggest best forum or institute to learn Pega for an IT professional who is working on legacy technologies.

Regards
Ramesh Nalla

Disclaimer : The contents of this e-mail and attachment(s) thereto are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or Zensar Technologies Limited or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of Zensar Technologies Limited or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. Zensar Technologies Ltd or its affiliate do not accept any liability for virus infected mails.

Probably the only explanation of why you are seeing it in clipboard for one case and not the other, is the data might be saved along with the case in the first scenario and hence you are seeing it in clipboard.

For your use case, evaluating declaratives in reports is a bit tricky because the declarative only fires when all the source properties are also fetched in the same report - which could be difficult to implement.

So, to show the property in the report, you may have to explicitly save the property value before saving the work object.

Since you have defined in work class, ideally the property should be show both Parent and Child pyWorkPage. Is this a scalar property or inside Embedded property? Either ways, Are you not able to find the property in child case report definition?

Report definition is in Work class which is used to display both parent and child objects. And it’s a scalar property only.

Hi @yt110154 ,

Yes, you can’t see those that are used in the Declare Expression. Try using a Function Alias it will work.

or

Declare Expressions behave depending on their change tracking configuration.

When you run the report definition, system is placing those properties in a page and it runs the declare expression and considers the values present on that page.

You can use a legacy Declare Expression and configure the settings in the Change Tracking tab to calculate it only when the source properties are changed. This will allow the Declare Expression to run in the UI when you change the values, but not when running reports, as the values have not changed. Instead, it will use the value stored in the DB column rather than recalculating it.

Thanks,

Ashok

I tried alias and legacy declare expression which doesn’t work. The property itself is not lying in the clipboard for child case.
Alternate approach which worked:

Tried calling Property-Seek-Value in post processing activity which actually persisted the value into workpage of child. what could be the reason?