Question

10
Replies
13326
Views
ParisQ07 Member since 2017 20 posts
NCS Group
Posted: November 30, 2017
Last activity: December 28, 2017
Closed
Solved

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.

It shows

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).

Any suggestion?

Low-Code App Development Dev/Designer Studio Case Management
Moderation Team has archived post
Share this page LinkedIn