Como crear restricciones en un grupo de preguntas select_one

Hola

Tengo un inconveniente, deseo realizar una restricción en un grupo de opciones select_one, donde el encuestado no pueda responder a todas estas con un NO (2).

He intentado con un not(selected...pero este no funciona.

Estoy usando ODK Collect V1.18.2 en Android

Sistema Operativo Win10

¿Me pueden colaborar?

I want to make a restriction in a group of select_one options, where the respondent can not answer all these with a NO

Because these are all select_one questions, you do not actually need to use the selected() function.

Try this: for every select_one question in the group add a constraint of the form:

constraint = "not(${p51_a}='no' and ${p51_b}='no' and ... ${p51_l}='no')"

By doing so, this constraint will fire when you attempt to set the last one to 'no'. Because you can answer the questions in any order, you need this constraint on all the questions. Have a go and report back if it works! :slight_smile:

Gracias Xiphware por la respuesta, la he puesto en practica pero por algún motivo al activar el ultimo en NO me sale que debo desmarcar el NO pero de la primera opción, si paso a un SI cualquier otra sigue la restricción activa y no me deja continuar.

Ah. What is probably happening is that because there is no enforced order that you must complete the questions, as soon as you hit the 'NO' on the last one, all the constraints on all the other questions fire (all at once), and you'll be seeing the first failed constraint in the form - that of the first question!

I'm not sure there's going to be a way around this without forcing the user to answer the questions in a predetermined order, making them all mandatory, and then having this check only on the last one.

Hola LG1982, no creo que te sirva a esta fecha pero modificando un poco la respuesta de Xiphware y agregando un note podría servir.notod.xlsx (16.3 KB)

Saludos!