Several relevants for a XSLform Kobotoolbox

Hello everybody

I'm doing a questionnary and i want to make a " relevant " but only if the person who do the questionnary put " several good answer".

Example:

Question 1: what is your nationalité

  • Russian
  • Ukrainian
  • Armenian
  • Other

question 2 : what is your ethnics

  • Russian
  • Autre

Question 3: have you ever been persecuted because you are russian ?

  • Yes
  • No

So I want the question 3 only appears if the person selects:

  • Q1 = Ukrainian or Arménian or Other
  • Q2 = Russian

For instance i want to know if russian peoples citizen of Ukraine have ever been persecuted.

For the Q1 i think the good " code " is: (${nationalité} = ‘ukraine’) or (${nationalité} = ‘arménie’) or (${nationalité} = ‘autre’)

I don't know if you get what i mean

See the documents to check how works conditionally-showing-questions

https://docs.opendatakit.org/form-logic/#conditionally-showing-questions
http://xlsform.org/en/#relevant

1 Like

Thanks you but i read it before posting and i do it again and i don't find a example of my case.

Welcome to the ODK forum, @Solcastel ! We're glad you're here. When you get a chance, please introduce yourself here. I'd also encourage you to add a real picture as your avatar because it helps build community!

In the relevant column for question 3 you would put something similar to:

( ${q1} = 'Ukrainian' or ${q1} = 'Armenian' or ${q1} = 'Other' ) and ${q2_name} = 'Russian'

Question 3 will only be asked if the relevant statement evaluates to true.

You will need to replace "q1" and "q2" with the name values for those questions on your survey sheet. And the answers in the quotes should match the name values for those options on your choices sheet.