Table of Contents

Article

Displaying a list of recent items in your application

Beginning with Pega® 7, you can view a list of the most recently accessed cases, rule or data instance records, Create New and Save As forms, landing pages, wizard items, and instance lists in your application. This list provides a way for you to easily view and open recent items.

The information in this article applies to Pega Platform 7.2.2 and earlier versions. For later versions, see Displaying a list of recent items in your application.

To see the default format and styling of recent items, see the Designer Studio Recent Explorer:

Recent Items list accessed from the Recent Explorer
Recent Items list

You can customize the data, format, and number of items that are displayed in the Recent Items list.

Displaying a list of recent items in your application

To display a list of recent rules, cases, landing pages, and wizards in your application:

  • Include pxRecent in a section in your application
  • Enable tracking of recent items by including the PegaRULES: TrackRecents access role

To do this:

  1. Open an existing section or create a section in your application. See the PRPC Help for information about working with sections.
  2. On the Design tab, click Layout, and then select Section.
  3. Drag the section to the desired location, and then release the mouse pointer. The Section Include dialog box is displayed.
  4. In the Section Include dialog box, enter pxRecent in the Section field.
    Section Include dialog box
  5. Click OK. The pxRecent section is included:
    Recent section
  6. Save the section.
  7. Enable tracking of recent items by including the PegaRULES:TrackRecents access role.

Your application is now configured to display the 20 most recently accessed rules, cases, landing pages, and wizards. You can customize the Recent Items list.

Customizing the Recent Items list

You can customize the display of the Recent Items list by modifying the following elements:

If you want to customize the Recent Items list, save a copy of the pxRecent section in your ruleset, and then make the modifications. that you want

Save a copy of pxRecent in your RuleSet

To customize the Recent Items list, save a copy of the pxRecent section in your RuleSet:

  1. Enter pxRecent in the Search bar, and then press Enter.
    Search bar
  2. In the Search results, select the pxRecent section.
    Search results
  3. In the pxRecent section, click Save as, and then specify the Applies to class and RuleSet version into which you want to save the section. Do not change the Purpose field.
  4. Click Save as.

Display rules, work items, or both in the Recent Items list

By default, items within both the Work- and Rule- classes are displayed in the Recent Items list. However, you can easily display only rules or only work items in the Recent Items list.

  1. Click the Gear icon gear.png in the Grid Repeat Layout header of the pxRecent grid to open the Layout Properties panel.
    Grid Repeat Layout header
  2. On the General tab of the Layout Properties panel, modify the data page parameter values as needed. For example, if you want to display only items in the Work- class in your Recent Items list, enter false as the value for the Rule parameter and save your changes.
    Layout Properties dialog box
By default, rules, work items and landing pages are captured in the Recent Items list. Wizards are also tracked for the current session, but tracking does not persist across logins. Other harnesses are not tracked. However, you can enable recent list tracking of other harnesses by setting the @baseclass.pxTrackThisDocument property to true on a harness’ primary page. You can choose to do this by using a preactivity.

Modify the number of items that are displayed

To modify the number of items that are displayed in the Recent Items list:

  1. In the pxRecent section, click the Gear icon gear.png in the Grid Repeat Layout header of the pxRecent grid to open the Layout Properties panel.
    Grid Repeat Layout header
  2. On the General tab of the Layout Properties, specify the number of items that you want to display in the Recent Items list in the Page size (number of rows) field. In this case, up to 20 items are displayed in the Recent Items list.
    Page size (number of rows)
  3. Click Save changes.

As a best practice, ensure that the number that you specify as the Page size (number of rows) is the same number specified in the Maximum Documents field of the dynamic container used in the portal. A system setting, Pega-UIEngine.pyMaxRecentsCount, controls the maximum number of items tracked per user. The default maximum is 30 items per user.

Changing the style of the list

You can change the style of items in the Recent Items list by:

Select another grid style from the skin

You can change the style of the Recent Items list by referencing another grid style format in the skin:

  1. Click the Gear icon gear.png in the Grid Repeat Layout header of the pxRecent grid to open the Layout Properties panel.
  2. On the Presentation tab, select a format in the Style field. To select a custom style format defined in the skin, select Other in the Style field, and then specify the format.
    Presentation tab
  3. Click Save Changes.

Modify an existing grid style in the skin

You can change the style of the Recent Items list by modifying the style in the skin rule. For information about determining the skin in use, see Associating a skin with the user interface.

You can use the UI Inspector to determine the style applied to the Recent Items list. See How to use the UI Inspector tool.

To modify the grid style applied to the Recent Items list:

  1. Open the appropriate skin. See Associating a skin with the user interface to determine the skin in use.
  2. Select the Components tab, and click Change component.
  3. In the Layouts area, select Trees & grids.
    Components tab
  4. Modify the styles as needed and save the skin.
    Tree & grid style formats

Define a custom grid format

If the existing grid formats do not meet your needs, you can create a custom grid format and apply it to the Recent Items list grid.

To do this:

  1. Open the appropriate skin.
  2. Select the Components tab, and click Change component.
  3. In the Layouts area, select Trees & grids.
  4. Click Add, and then enter the name of the grid format that you want to create.
    Add format
  5. Define the styles and save the skin.
  6. Open pxRecent. In the Grid Repeat Layout Properties panel, select Other in the Style field, and then specify the custom grid format that you created.
  7. Save the section.

For more information, see Creating multiple style formats in the skin.

Customizing the data and label that are displayed in the list

To change the information that is displayed in the list of recent items at run time, you can extend the label section, pxRecentLabel.
pxRecentLabel

For example, you might want to display both the claimant's name and the claim number in the Recent Items list:
Recent items list

You can add fields to the Recent Items list by extending the pxRecentLabel section. For example, you can choose to include the rule description, followed by a second line that contains the rule type and rule name, separated by a pipe character, as shown in the following figure.
Recent items list

To extend pxRecentLabel, save a copy of the pxRecentLabel section in your ruleset, and then make the modifications.

As a best practice, extend the pxRecentLabel section to change what is displayed in the Recent Items list. However, if you need to include a new variable in the Recent Items list, you can modify the pyAddRecentListItem data transform, which is available in the Work- and Rule- classes.
Data Transform Add Recent List Item dialog box

Using Pega 7, you can display a customized list of recently accessed items and enable users to open items from this list. For more information about presenting lists in PRPC, see the PRPC Help.

Additional information

Associating a skin with the user interface

How to use the UI Inspector tool

Creating multiple style formats in the skin

Published October 7, 2013 — Updated October 16, 2017


66% found this useful

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.