Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Obj-Filter method

Updated on August 10, 2022

Use the Obj-Filter method to filter the embedded pages of a results page (such as a Code-Pega-List page produced by the RDB-List, Obj-List-View or Obj-Browse methods) based on one or more when condition rules.

For example, if each embedded page on results page contains a Page List property Child and each Child page contains a Single Value property FirstName, you can use the Obj-Filter method to remove all embedded pages where no value of FirstName is "Robert".

Note: For best performance, use an Obj-Browse method to search and retrieve instances of a class where the selection criteria involve only Single Value properties exposed as columns in the PegaRULES database. Use the Obj-Filter method to refine search results by deleting pages based on when condition tests that involve non-exposed property values, including aggregate properties.

Parameters

This method has two required parameters and an array parameter.

ParameterDescription
ListPage Name of the results page, of class Code-Pega-List.
ResultClass Select the Applies To key part of one or more when condition rules ( Rule-Obj-When ) to be used to test each result. Must match or be an ancestor class of the class of the embedded pages in the ListPage page.
When Complete at least one row of this array, specifying a when condition rule. Enter the second key part ( When Name ) of a when condition rule. Typically, the comparisons and expressions in the when condition rule involve one or more aggregate properties or unexposed properties.
Note: Because the embedded pages may contain only a portion — not all — of the properties of the listed instances, make sure the when condition rule you identify here involves only the properties that are expected to be present. If your when condition rule mentions a property not present on the embedded page, the system uses the null value in the when rule evaluation, not the true value that is saved in the PegaRULES database.

Results

At run time, the system uses rule resolution to find the when condition rules.

Use the Obj-Filter method to filter the embedded pages of a results page (such as a Code-Pega-List page produced by the RDB-List, Obj-List-View or Obj-Browse methods). When one or more when rules evaluate to false, the page is removed from the results page.

The embedded pages for which all when condition rules evaluated to true are not affected.

The contents of surviving embedded pages are not affected.

Checking the method status

This method updates the pxMethodStatus property. See How to test method results using a transition.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us