Multiple relevant clauses

What is the problem? Please be detailed!
I would like to include multiple relevant clauses for one question in my XLS form. The logic I am trying to use here is question C is only relevant if question A OR question B is answered yes. How do you write an OR clause for the relevant section in an XLS form?
I currently have: ${B9} = 1 or ${B10} = 1 with B9 and B10 being the referenced questions and 1 corresponding to an answer of yes. However, this does not yield the desired result.

Any ideas would be greatly appreciated. Thank you for your help and time.

What ODK tool and version are you using? And on what device and operating system version?

I am using an ODK xls form.

Cheers,
Sarah

What type is question 1 and 2? Is it select one?

1 Like

yes, they are both select one type questions where 1= yes and 2=no. I think I have written the section under "relevant" incorrectly.
I have: ${B9} = 1 or ${B10} = 1
but this will only work for the ${B9} = 1 section and will ignore the second part of the phrase.

Hi @Sarah_Pfeil,

You can try (Selected(${B9}, '1') or selected(${B10}, '1')) under the relevance column.

I hope this helps.

@Sarah_Pfeil
relevant.xlsx (7.5 KB)

Thank you this solved my problem! I was missing the ( )

i want to say if (reverselog1<=0 or reverselog2 <=0) or (reverselog1<=0 and reverselog2 <=0). i dont want the form to go forward if the answer is negetive but it does not work if the two are less than zero it only works if one of the two is less than zero. i had to create two note rows with required yes and only relevant if reverselog1 or reverselog2 or both are less than 0.EOCODKcycle4.xlsx (31.4 KB). regards

Hi. How if there are 3 statements, such as

A or B or C

How to write it in Relevant field?

Can you perhaps post the specific example you are trying to solve. In actuality, the relevant field is basically just an XPath expression, which as such supports the XPath 'or' operator. eg

(${A} = 0) or (${B} = 1) or (${C} = 2)