Posted: 22 Jan 2016 8:48 EST Last activity: 11 Aug 2017 17:00 EDT
How to include section from page group
I've been stumped by something that should be very simple.
I currently have many copies of sections with text controls which refer to properties in this fashion:
First section: .MyPageGroup(FistItem).Property1, .MyPageGroup(FistItem).Property2, etc.
Second section: .MyPageGroup(SecondItem).Property1, .MyPageGroup(SecondItem).Property2, etc.
Third section: idem.
Every section has his/her own flow actions and every flow action has his/her own flows.
Well, since Pega is all about re-use, I tried to simplify, but I have hit some problems:
First, It seems to be impossible to include a section in a section using a page group reference.
I have created a section in the class of MyPageGroup. In the original section I try to include that section, setting the reference to "Use clipboard" and setting .MyPageGroup(FistItem) as the page to use. Checked that page was added to the Pages&Properties tab (it was) and save. But when displaying the section the included section is not present.
Second, Referencing a page group with a parameter doesn't work. So, .MyPageGroup(param.Pagegroup) will always lead to an error.
Third, it does not seem to be able to parameterize a flow action. That parameters tab is not present. This breaks the "parameter chain" from section to flow.
You haven't specified the version you are using so I will assume it is v7.1.9
First) Assuming the PageGroup property is directly applied to the work class, when including the section in the layout, fill it out as follows:
Page Context: Use Clipboard Page
Class: Class of page group
Clipboard Page: .MyPageGroup(FistItem)
Section : By Name: [Name of Section]
Nothing had to be added to the Pages and classes tab since the property could be resolved by the current class of the section.
The trick here is the page must exist on the clipboard to display the section. This can be done by initializing a property on the page to an empty string. If the page doesn't already exist the section will not display. Similar idea to an object must exist before you can execute rules on it.