LinkedIn
Copied!

Table of Contents

Obj-Filter method

Version:

Only available versions of this content are shown in the dropdown

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

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.

Parameter Description
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.
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 runtime, the system uses rule resolution to find the when condition rules.

It applies the when condition rules to each embedded page, and deletes any embedded pages for which any when condition evaluates to false.

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

The contents of surviving embedded pages are not affected.

Properties of Code-Pega-List

This table identifies some of the main properties of the Code-Pega-List class, which is output from various methods. Properties marked with a yellow diamond dot can hold input parameters for the search. Other properties specified as read-only contain outputs from the search.

Property

Purpose

pyCacheFile

For list view reports that save results as an XML file in the lookup list cache, identifies the file name.

pyCondition dot

A Page List. Identifies the parameters that define search comparisons, for the Obj-List method:

  • pyConditionFieldName — A property reference resulting in a single text value
  • pyConditionOperation — A comparison operator, such as "<"
  • pyConditionValue1 — An expression for the comparison value
pyDetailsAction dot

For list view and summary view rules, identifies the value of the pyAction parameter to the ShowView activity, such as PREPARE or SHOW.

pyDetailsWindow dot

For list view and summary view rules, identifies the name of the window that is to hold the resulting display.

pxElapsedTime

Elapsed time in seconds to process the RDB-List operation. Read-only.

pxMore

Indicates whether there are more instances not returned. Values are true or false. Read-only.

pyMaxRecords dot

Optional input to limit the number of rows returned.

pxNextKey

Indicates the key of the first row (instance) not returned, if pxMore is true. Read-only.

pyObjClass dot

Identifies the class containing the instances that are to be searched. This property is different from pxObjClass, the class of this page, which always has the value Code-Pega-List.

pyPageSize dot

For list view or summary view rules that support report paging, the maximum number of results to presented on a page.

pyQueryTimeStamp

A DateTime value recording the start of the operation. Read-only.

pxResults

A Page List containing pages with individual search results. each of the class defined in the pxObjClass property. (Not used for Obj-List methods that specify the lightweight results format.) Read-only.

pxResultCount

Number of rows of data returned by the search. Read-only.

pyReturnLightweightResults dot

For the Obj-List method, indicates that the results are in a special format rather than in pxResults pages. Read-only.

pxSelectStatement

For the Obj-List method, the SQL statement sent to the database before substitution. Read-only.

pxSQLStatementPost dot

For the RDB-List method, SQL statements as sent to the SQL database. Appears only when requested through the {SQLPage} syntax. Read-only.

pxSQLStatementPre dot

For the RDB-List method, SQL statements before substitution. Appears only when requested through the {SQLPage} syntax. Read-only.

pxTimeElapsed

For the Obj-List method, elapsed seconds taken for the method. Read-only.

pxTotalResultCount

For the RDB-List method, the total number of results returned by the query. This is set only if pyReturnTotalResultCount is true. (If pyReturnTotalResultCount is false, then this is zero.) Read-only.

pyUseAlternateDb Set to true if an alternate database, not the primary PegaRULES database, was the source of data for a list view or summary view report.

Checking the method status

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

Related Content

Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

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