Constrain in multiple select questions

For multiple questions, there are 10 answer choices, the top 3 answer choices must be chosen. Does anyone know how to write the Syntax Constrain in XLSForm?

You can handle it using a constraint multiple_select_3_options_mandatory.xlsx (14.0 KB) and additionally, you can Pre-populate select with default option Pre-populating select with default option

Thanks it's very helpfull


I have a question where the choice of answers is the result of selection from some of the previous questions. How to make a constraint formula if all answers must be selected. In this case count-selected cannot be used because we do not know how many choices there are answers.

Could you please share XLSForm here and explain little bit more.

Hi ARIF_AZAD_KHAN, select all.xlsx (13.7 KB) I share the XLS Form ... at the last question I want to make a constaraint so that all answers are selected

Check the attached file and let us know if it worksselect all.xlsx (20.8 KB)

thank You RIF_AZAD_KHAN, very helpful

Hi Arif, I need your help again.
I want to create a constraint where Brand X cannot be selected if it already exists and is selected in the column: Question 1, Question 2 or Queston 3.
Is it possible to create a syntax under the Constraint column?

test costraint Test constraint.xlsx (16.3 KB)

Check attached file Test constraint.xlsx (22.1 KB)

It works. Thank you. You are the best :+1: