How to use multiple boolean operators for one question

Hi, I have a question which i want to show it after selection of some other questions. For that i have to put operators in relevant column in xls form.

How can i use multiple operators for same question
say for example

Question is “Name of Beneficiary”
this question should be activated once 3 questions are answered in particular way
say 3 questions are batch=‘yes’, and either activity = ‘visit’ or activity=‘meeting’

i mean 2 questions batch and activity

Hi @mandar,

You could do the same as outlined in the image below:

In the survey tab of your xlsform:

In the choices tab of your xlsform:
Image 2

Data entry screen as seen in Enketo: When the conditions are not met

Data entry screen as seen in Enketo: When the conditions are met

Reference xlsform:
Skipping 2020 09 05.xlsx (11.2 KB)

To understand more on skipping please feel free to have a look at our support article Adding Skip Logic

Have a great day!

In my case, i need to use ‘and’ and ‘or’ operations simultaneously, Let me give an example from the image you had sent above.

I need to display Q4 in form only when Q1 and either Q2 or Q3 is answered. So what should be the formula under relevant column?

Hi @mandar,

Try using this, it should solve your issue:

${Q1}>'0' or ${Q2}>'0' or ${Q3}>'0'

This condition satisfies if and only if Q1 is entered something or Q2 is entered something or Q3 is entered something. Else if none of the fields are entered Q4 would not show up.

As an alternative, you could also try out the following:

${Q1}>'0' and ${Q2}>'0' and ${Q3}>'0'

This condition satisfies if and only if Q1 is entered something and Q2 is entered something and Q3 is entered something.

Additionally please feel free to have a look at our support article Advanced Calculate Question Type. It should help you a lot with using advanced calculations within your xlsform.

Have a great day!