A Multiple Choice question does not have a built-in setting for the maximum number of selections. To limit how many options a respondent can choose, add an Error Validation that counts the selected options and stops the respondent from continuing when they select too many.
This example limits the question "Which areas would you most like to develop over the next 6 months? (Select up to 3)" to three selections out of six options.
Before you start: validations are a type of calculation, so Use Calculations must be selected in the assessment's settings. For details, see Setting Up Validations.
Tip: Include the limit in the question text (for example, "Select up to 3") so that respondents know the limit before they answer.
Step 1 - Add a calculation after the question
- Open the assessment in the Assessment Builder.
- Hover over the Multiple Choice question.
- Click Add Calculation, then select After.
Step 2 - Set the calculation details
- Enter a Calculation Name, for example "Limit development areas to 3".
- In Calculation Type, select Error Validation. An Error Validation stops the respondent from continuing until they correct their answer.
- Leave Max Points at 0.
Step 3 - Build the validation formula
The formula counts each selected option as 1, adds the counts together, and returns 'true' when the total is greater than the limit. A result of 'true' displays the validation message.
Build the formula with the tiles in the Validation field:
- Select each option of the question from the Answer Text list.
- Select Len from the Functions list.
- Enter the numbers and the
'true'and'false'values as Free Text.
Case When ( Case When Len ( S1 SS1 Q10-A1-Communication ) > 0 Then 1 Else 0 End ) + ( Case When Len ( S1 SS1 Q10-A2-Delegation ) > 0 Then 1 Else 0 End ) + ( Case When Len ( S1 SS1 Q10-A3-Strategic thinking ) > 0 Then 1 Else 0 End ) + ( Case When Len ( S1 SS1 Q10-A4-Coaching others ) > 0 Then 1 Else 0 End ) + ( Case When Len ( S1 SS1 Q10-A5-Time management ) > 0 Then 1 Else 0 End ) + ( Case When Len ( S1 SS1 Q10-A6-Decision making ) > 0 Then 1 Else 0 End ) > 3 Then 'true' Else 'false' End
How it works:
- When an option is selected, its Answer Text returns the option's text. When it is not selected, it returns nothing.
-
Len ( ... ) > 0therefore turns each option into 1 (selected) or 0 (not selected). - The total is compared with the limit (3 in this example).
To adapt the formula:
- Add one
+ ( Case When Len ( ... ) > 0 Then 1 Else 0 End )line for each option in your question. - Change
> 3to your own limit.
Step 4 - Enter the validation message
In Validation Message, enter the message the respondent sees as Free Text, for example 'Please select no more than 3 areas.'
Step 5 - Test and save
- Click Test to check that the formula is valid.
- Click Save.
- Open a Test Response and select more options than the limit. The validation message appears when the respondent clicks Next, Save Progress or Finish. They must click Return and change their selection before they can continue.
Note: The validation is checked when the respondent saves or leaves the page, not as each box is ticked.
For full details, see Setting Up Validations, Setting Up Calculations for Assessments and Add and Manage Questions and Answers.
Comments
0 comments
Please sign in to leave a comment.