Skip to main content

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

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

How to allow users to select multiple items from a SelectList control

Updated on May 3, 2020


A developer asks: Can I allow an application user to select multiple elements from a SelectList control? The possible choices are in a Value List property.

I was able to build the HTML code for this in an HTML Property rule, but am not sure how to get the users's selections.


Suggested Approach

Such multiple selections are not supported by any standard HTML property rule. As a best practice, you can present a list of labeled check boxes.  

Update: In V5.4+, a separate HTML property rule MultiSelectList is available, so the approach described here is not necessary. For an example use of the MulitSelectList rule, review the standard section rule PegaAccel-Task-CircumstanceSearch. FindByCircumstance_Circumstances.

You need a Page List that contains a property — for example the standard property @baseclass.pySelected — that is presented as a check box, and properties that name the things you want to list. 

Populate the Page List with all the entries from which you wish to select. 

Build an HTML display that, through a ForEach directive on the elements of the Page List, displays a check box and the choice element.  If the list is long, you may want to employ a scrollable <DIV > element.

Basically, after the user enters his choices, your Page List needs to contain, for each element, a name and a value indicating whether that element is selected.

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. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us