Table of Contents

Article

How to add a list-to-list control to a flow action form

Summary

A List to List control on a work object form allows a user to make multiple selections from one list of candidates. In this example flow action from an auto insurance application,, a user selects safety equipment from the left list, each identified by name, and clicks an arrow to add the selection to the right list. The right list identifies chosen safety equipment options; the left list contains all of the available options.

List to List Control

Additional controls (unless disabled when the rule is configured) allow the user to sort either list, to remove previous selections, to copy all or remove all selections. The user can make further changes until the user submits the flow action form.

The List to List control is supported by two Page List properties, one providing the list of source values and one providing the list of destination values. As a result, the output of a List to List operation is not an array of text values (such as can be stored in a Value List property), but an array of embedded pages, identified by one visible text property such as a name.

This article presents a step-by-step procedure for adding a List to List control to a harness, section, or flow action form. For full details on all options, consult the Help system topic.

 

Suggested Approach

Preparations

Identify or create these parts of the List-to-List control:

  • The source property, a Page List property of class Code-Pega-List.
  • An activity or other processing to populate the source property.
  • A Single Value property within each embedded page that identifies the page, for display
  • The target property, also a Page List property, typically part of the work object. (The embedded pages of the target property are often of the same class as the embedded pages of the source property, but this is not a requirement.)
  • Properties that are needed in the target embedded pages.

The source property structure matches those produced by the Obj-Browse, Obj-List-View, and RDB-List methods, but your application can create the source property by any means.

Unlike the Dynamic Select control and AutoComplete control, the List to List control requires the source property to be populated before the user sees the form containing the control.

Adding the control

MenuTo add a List to List control to a flow action, harness, or section rule:

1. Open the rule form. Select List to List from the Advanced control group.

2. Drag the List to List icon to a cell on the form, and drop it. The cell may change size to accommodate the large control; you can adjust the size later.

3. Click the magnifying glass icon at the upper right of the cell to open the Cell Properties panel.

Cell Properties4. No changes are needed on the Field tab of the Cell Properties panel. On the Presentation tab, confirm that the Format is ListToList.

5. Click the magnifying glass to the right of the Format field to open the Params pop-up window.

6. Complete the Params window. Identify the source property, the target property, and the text property to appear in the source lists. Include double-quotes around property references if they contain a period character.

Optionally, enter two captions, to appear above the two lists.

Select Copy all properties if, when a user selects an item, the system is to copy all properties on the embedded source page, creating a page with identical properties on a new embedded page with the target property. Alternatively, you can define a from-to mapping and control which properties are copied.

Format Parameters
By default, the left list displays at most 200 values, even if the source property contains more than 200 embedded pages. By default, there is no limit on the number of pages that a user can add to the target property. You can change either limit through parameter settings.

7. Click Save to close the Params window.

8. Optionally, complete other values on the Presentation tab and Conditions tab of the Cell Properties panel.

9. Click Apply to apply the changes you made to the Cell Properties panel and Parameters window. Click OK to close the Cell Properties panel.

10. Save the rule form.

11. Test. Ensure that your application populates the source property before the work object form (or flow action form) appears.

A sample activity

This one-step activity creates a page SafetyEquipment of class Code-Pega-List. (Identify this page on the Pages & Classes tab of the Activity form.)

ActivityWhen executed, the clipboard contains a page for each piece of safety equipment.

Source ClipboardAfter a user submits the flow action form, Process Commander copies pages from the source property to the target page. Six selections appear as embedded pages to property pyWorkPage.Entrants.

Target Clipboard

Published October 24, 2007 — Updated March 24, 2008


50% found this useful

Have a question? Get answers now.

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