Power filters incorrectly applied in subobject instances
search cancel

Power filters incorrectly applied in subobject instances


Article ID: 232552


Updated On:


Clarity PPM On Premise Clarity PPM SaaS


When a power filter is applied on a master object list view and it looks to two or more conditions on subobject instances, the conditions are applied across different instances instead of being applied at a single instance 


1.  Administration > Studio > Objects
2. Create a subobject of the project object called MySubobject
3. Create a boolean type attribute called Active
4. Create a project called "Testing Power Filter"  > subobject list
5. Create an instance with name Sub1 and set the Active flag No
6. Create an instance with name Sub2 and set the Active flag Yes
7. Go to the Project list, expand the filter and create a Power Filter
   ( any( ( MySubobject Project Name = 'Sub1' ) ) and any( ( MySubobject active = 1 ) ) )
   Expression: any("mysubobject", mysubobject.name == "Sub1", project.odf_pk, ctx ) &&   any("mysubobject", mysubobject.active == 1, project.odf_pk, ctx )
8. Save and Return
9. Notice the power filter is applied

Expected Result: No data is returned because the power filter should apply to a single subobject instance and the condition is not met: Sub1 is not active
Actual Result: The "Testing Power Filter" is returned because the power filter criteria is met across instances: Sub1 instance exists and Sub2 is active


This has been analyzed through DE63828


This is currently working as design.

The expressions inside the 'any' clause get evaluated individually.

Clarity does not allow you to create an expression via the power filter so both expressions affect the same instance.

However, you can manually add the expression to get the desired effects.

Please find an example of a power filter that can be created manually:

any("mysubobject", (mysubobject.name == "Sub1" && mysubobject.active == 0), project.odf_pk, ctx )


Additional Information

This happens on all subobjects regardless of the master object. it happens with all kinds of attributes when two of them are being used on the power filter