Can you please help me to understand how reference Property is linked to other property? Here we don't pass any parameters to look for the match, how does the System know which property in the Pagelist(in Dependent) to reference Spouse information(in Employee).
In SAE-HRServices-Data-Employee create a single page property named Spouse that points to the page definition SAE-HRServices-Data-Dependent, which contains the spouse’s date of birth and relationship information.
On the Advanced tab, indicate that the property can be used as a referenced property in activities.
On the Application Explorer, the spouse page appears as shown here.
Create a PostAddDependents activity and do the following:
o In the first step, use a Property-Set method to get the index of the spouse. Enter Local.Index in the PropertiesName field, and @(Pega- RULES:Utilities).IndexInPageList("Spouse", "Relationship", .Employee.Dependents) in the PropertiesValue field. A precondition in Step 2 determines whether a spouse is on the list. If not found, Step 2 is not initiated.
o In the second step, use a Property-Ref method to link to spouse in the dependents list. Enter .Employee.Spouse in the PropertiesRefName field, and .Employee.Dependents(Local.Index) in the PropertiesRefValue field.
o Add a When precondition that tests for a spouse on the list.
Use the activity method called Property-Ref to establish the relationship between a reference property and an actual property. [ side question: since data-transforms are preferred over activities these days, what is the preferred way to do this ? ]