Code of relevant with two questions

Dear Community,

I have the questionnaire as attached. I want q11 to appear when choice 12 in q8 is not chosen or when choice 3 in q10 is chosen. Please help, I have been trying:

  1. (${p4_10}= ‘2’ or ${p4_10}= ‘1’) or (${p4_8}!=‘12’)
  2. (${p4_8}!=‘12’) or (${p4_10}!=‘3’)
  3. ${p4_8}!=‘12’ or ${p4_10}!=‘3’
    But it doesn’t work. Thanks in advance.

Best regards,
phearunBook1.xlsx (14.5 KB)

Welcome back to the community, @Phearun! You could do it as outlined in the image shared below:

In the survey tab of your xlsform:

In the choices tab of your xlsform:

Data entry screen as seen in Enketo: when nothing is selected in both Q8 and Q10

Data entry screen as seen in Enketo: when 12 is selected in Q8

Data entry screen as seen in Enketo: when 12 is selected in Q8 and 3 is selected in Q10

Data entry screen as seen in Enketo: when anything else other then 12 is selected in Q8

Data entry screen as seen in Enketo: when anything else other then 3 is selected in Q10

Reference xlsform:

Book1.xlsx (14.3 KB)

@Kal_Lam Thank you for your response. But it seems that question11 still appear when choice 3 in question 10 is selected (as appeared in the picture).

Try this in E4 and it should solve your issue:

(${p4_8}!='' and not(${p4_8}='12')) and (${p4_10}!= '' and not(${p4_10}= '3'))

Reference xlsform:

Book1.xlsx (14.2 KB)

@Kal_Lam Yes, it works thank you so much

1 Like