Function PropertyExists returns unexpected results (Step page)
SummaryThe Pega-provided function PropertyExists produces false results when the property does not exist on the Step page.
Error MessagesNot Applicable
Steps to Reproduce
- Create an activity that calls PropertyExists for a page list on any page except pyWorkPage or pyWorkPage.pxResults, for example, @PropertyExists("pyWorkPage.pxResults"').
- Observe that result of the function is false.
- Create the page pyWorkPage.pxResults(1)
- Re-run the activity calls PropertyExists for a page list on any page except pyWorkPage or pyWorkPage.pxResults, for example, @PropertyExists("pyWorkPage.pxResults").
- Observe that the value returned this time is true, even though no property named "pyWorkPage.pxResults" exists on the Step page.
Root CauseThis is expected behavior for which an explanation is provided.
ResolutionHere is the explanation for the reported behavior: This is expected behavior.
There is no issue as such with getIfPresent clipboard API or PropertyExists function. The reason for the ambiguity is that PropertyExists and PageExists functions do not mention how complex references of type A.B (where A is a page and B is a property) are handled in those functions. A.B will generally resolve the top-level page to A and try to get a property named B in A. When A.B is used, the top-level page becomes A, not the Step page from which the function is called.
Published April 25, 2017 - Updated April 28, 2017