Unable to use the when-rule: [Pagelist] contains a page where [Property] equals [Value]
I have a page list like .employees: name, gender, age, etc
I want to check is there any female employee,
so I would create a when rule which checks:
[.Employees] contains a page where [.gender] equals ['false']
After that, the error appears:
1. Pega don't allow me to choose [.gender], it only pop up property at current class, which .Employees should represent a list of a sub-class.
2. When I try to save it like [.Employees.gender] or [.Employees(<CURRENT>).gender] or [.Employees().gender], none of them work.
Field name in condition definition—
Property @baseclass.Employees is undefined.
Invalid expression or reference: No candidates found [possible function name, ruleset/version or number of parameter problem]
Invalid expression or reference: Operation "==" is not permitted on types: truefalse and unknown
If it is mean to fail, why not just remove it from the when rule, and explicitly suggest us to use Activity or data transform instead.(BTW, how to use activity or data transform to achieve this goal)
If I can write my own pure function it would be super easy. Just that pega don't allow us code by ourselves, so we have to look for a "reinvented wheel"(aka. OOTB function).
Do you have any solution to check a property value of a page in a page list? I just tried declared expression. Surprisingly it is not working as well. What a Information system is if it cannot even take care of linear data structure....
Do let us know if you wish to file a product enhancement request. We, moderators, could file one for you on our internal portal. However, you would need to follow it up by discussing with your Pega Account Executive.
Yes, this is a forum for all your Pega product questions. Sometimes, there arises a need to create SR (Service Request) - when there is a detailed level of investigation that requires our engineers to look into your system and troubleshoot or if it is a product defect. In this case, I'd advise an SR so that you could get more of detailed and researched response and if required the engineers will create a product defect on your behalf.
An SR can be created on the My Support Portal. If you need further assistance in creating SR, please contact your Pega Account Executive.
Finally we manage to do it via expression in when rule. @IsInPageList("true", ".Gender", .Employees)
Or if you want to make use of this When Rule Option, don't rely on their AutoComplete controls. Use text for both [PageList name] filed and [Value] field, just like how they are taken by the "IsInPageList" method. (Note that there is a dot in the page list name, and the value should also be quoted)
[.Employees] contains a page where [".Gender"] equals ["true"]
But please do fix the scope of the autocomplete control someday. I am too lazy to formally file a Support Request for that.