Restrict the selection count in choice (checkbox list)

Nice Post from of my Buddy .. Karan Varma


Drag and Drop DataLabel control to view canvas and Change its name to dlbScript
Drag and Drop Choice control to view canvas
Restrict Choice Selection -1
Change the name of Choice list to “ChkListUsers”
Set property Display Type to Check Box List

Restrict Choice Selection -2

Add data source to Choice control and changes the properties as per your requirement.
For dlbScript control do the following changes in properties
1. Set Literal property Checked
2. Click on Oval to add Expression for dlbScript control

Restrict Choice Selection -3

3. Add the below jQuery code

Restrict Choice Selection -4.jpg

Add jQuery code between the Script tag.


if($(':checked').length == 1){
if($(':checked').length == 0){

4. Once done click on Ok and then on Finish button for view.


Restrict Choice Selection -5.jpg

  • On selecting User 3 Other Users selection will be disabled.
  • Once you Unselected user 3 all users will be again selectable.

View original post


Author: Vijay

I'm a K2 Certified Developer, helping teams to automate, design, develop & maintain business process applications connecting across multiple platforms with multiple technologies.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s