Back Forward More about List View rules
 

About List View rules

  Show all 

A list view rule defines report characteristics that Process Commander converts into source HTML when you save the form.

 Processing overview

When executing a list view rule, Process Commander uses stream processing to select, retrieve, and format data for user presentation. Normally, it creates SQL statements from information on the Content tab and sends the SQL request to the Process Commander database.

The database results appear in a Page List property named pxResults of class Code-Pega-List, which contains a Page property pxResults(1), pxResults(2), and so on for each returned row (each object instance). Each page value contains the properties listed in the Get These Fields array.

After database results are available, local sorting, filtering based on when condition rules, and formatting operations occur as defined on the Organize tab.

For performance reasons, some selecting, filtering, and sorting occurs through the software supporting the database (such as Oracle, IBM DB2 or Microsoft SQL Server), while later processing of the data occurs on the Process Commander server. Selection and sorting operations done by database software are typically faster, but are limited to those Single Value properties that are exposed columns in the database schema.

DateTime values (but not Date or Time of Day values) in the results are converted to display in the time zone of the user, based on the Time Zone value on the Availability tab of the Operator ID instance. This conversion affects selection criteria and displayed results, and so can present a different day and time for different users. KARAF B-15820

 Full Description display

The text of the Full Description field (property .pyDescription) of a list view rule (on the History tab) appears appear to application users as a report title. Choose text that clearly describes the report contents. You can include Reference directives in the Full Description, as in the following example:

List of {pagename.property1} as of {pagename.property2 }

Include only references that are certain to be present. This feature can support localization, through language-specific RuleSets. KARAF 1/2?/04. B-341

 Testing

If a list view rule requires no parameters, you can test it directly from the toolbar Run button (Run). Can you click RUN and supply parameters?

 Styles

See Understanding CSS styles.

 Executing a list view rule with an activity

To call a list view rule within an activity, use the Obj-List-View method or the standard activity Rule-Obj-ListView.ShowView, depending on your requirements.

Use the Obj-List-View method to create a results page (of class Code-Pega-List) containing the class instances that meet the criteria on the Content tab, sorted as specified on that tab. No output appears. Information in the Organize, Display Field, and Format tabs is not used. KARAF 7/27/04 9/13/05

Use the Rule-Obj-ListView.ShowView activity to support user displays and interactions. Specify one of four values for the pyAction parameter:

If report paging is enabled, report rows for only one page are returned. Complete these parameters on second and later calls to control the contents of the page: KARAF 3/9/06

To specify that execution is to use a reports database (regardless of the setting of the Use reports database? checkbox on the Contents tab), set the pyUseAlternateDb parameter to true. GRP-445 DSILA 9/16/08

To remove the data page after the initial display (reducing the size of the clipboard), set the removeDataPage parameter to true.

List view rules can accept additional parameters for selection, by referencing them with the notation param.name in the Value column of the Criteria array on the Content tab. Ensure that processing sets values for these parameters before the list view rule executes. For an example, see Pega Developer Network article PDNPRKB-25410 How to use parameters as selection criteria in a list view rule.

 Executing a list view rule with a URL

Alternatively, you can start a list view execution with a URL that identifies the Rule-Obj-ListView.ShowView activity followed by parameters settings in the standard CGI URL format. For example, this URL executes the standard list view rule Data-Admin-Calendar.ListCalendars: ShowView not DisplayView KARAF 1/22/07

http://server:8080/prweb/PRServlet?
   pyActivity=Rule-Obj-ListView.ShowView
   &pzPrimaryPageName=LISTVIEW_ListCalendars
   &pyViewPageName=LISTVIEW_ListCalendars
   &ViewClass=Data-Admin-Calendar&showHeader=false
   &pyContentPage=CalendarList

To assemble this URL, an activity can set values for these (and other) parameters with the param keyword and the Property-Set method.

Note To review the URL for an existing list view display (using Internet Explorer):

  1. Execute the list view rule.
  2. Right-click in the Internet Explorer window.
  3. Select Properties from the context menu
  4. Drag the mouse to select the URL text, which may be only partly displayed.
  5. Press CTRL+C to copy the URL.
  6. Paste the Windows clipboard into Notepad or a text editor.

 Personal versions

R-5432 If your access group identifies a local RuleSet, you can use the Customize View feature on those list view rules that offer it. Use the  Customize View   button to create a personal copy of the list view rule, with your Operator ID as the last key part. A local RuleSet is one that has the Local customization? box selected. B-10902

 Results

The list view facility works best for queries involving 500 or fewer rows. It does not support queries that contain more than 10,000 rows unless report paging is enabled.

TipFor best performance, limit the properties displayed to exposed columns in the corresponding database table; this prevents the need to load the Storage Stream column. Expose additional properties as columns if needed to improve performance. See Pega Developer Network article PDNPRKB-23116 How to detect and remedy the performance impact of Obj-List methods and list view reports.

 Access to search instances

To execute a list view rule, users must have the ability to search through instances of the class identified in the Applies To key part. Accordingly, users must have an access role that links to an Access of Role to Object rule (for the Applies To class or a parent class) in which the Search Instances value grants read-only access. KARAF 10/5/04

 Automatic backward chaining and Read Only displays

When checked, the Read Only checkbox (on the Content tab) prevents most changes to the data retrieved from the PegaRULES database during list view process. However, some reports may depend on backward chaining (defined by Declare Expression rules) to derive report contents. To allow such computations, backward chaining is allowed by default and may result in updated values on pages within the Code-Pega-List results page — an exception to the "read only" restriction. ERNSG Task-11607 9/13/2010 GRP-3856

If allowing such backward chaining computations is not desired, you can disallow backward chaining on list view rules where the Read Only checkbox is checked by adding a setting to your prconfig.xml file:

<env name="clipboard/VirtualListSupportAutoChaining"
   value="false" />

If the clipboard/VirturalListSupportAutoChaining element does not appear in your prconfig.xml file, the default value is "true".

 Agent can produce nightly reports

Using an agent and a Connect File rule, your application can produce PDF files of reports, on a daily or other regular schedule. See PDNPRKB-25731 How to produce reports on a nightly schedule.

 Java code display

When you save a list view rule, the system converts your HTML and JSP tags or directives to Java source code. As a learning or debugging aid, you can review this Java code. B-16814

C-1665Click the Show Java toolbar button (Show Java) to see the system-generated Java code that implements the list view rule. The window presents a read-only preview of the Java that implements this rule instance. This Java code is not identical to the Java that executes at runtime, which includes Java code inlined from other rule instances and reflects rules in the requestor's RuleSet list.

 Parent class

Through directed inheritance, the immediate parent class of Rule-Obj-SummaryView and Rule-Obj-ListView classes is the Rule-Obj-Report- class. At runtime, the system uses stream processing to assemble, format, and present the query results.

Definitions list view, reports database, stream processing
Related topics About Portal rules
User portal basics — Interacting with list view displays

How to address advanced reporting requirements
Example: Embedded list view display in a flow action
Standard rules Atlas — Standard properties in the Code-Pega-List class

UpAbout List View rules