More than one condition odk-x

I have a survey that I use with one condition

if selected(data(‘technologie-connecte’),‘yes’)
questions …
end if

But now I did modification and I want two condition
if selected(data(‘technologie_connected’),‘yes’) or selected(data(‘already_done_technologie_connected’),‘yes’)

questions …

end if

how should I do two conditions with or?


Generally, any valid JavaScript expression works.
For “Or” you use ||
“And” is &&
Be very careful always with parentheses when combining!
For example, if you want someone with age 15+ (q306) and at least one brother (q2401_1) or at least one sister (q2401_1) you would do something in the condition like:
( data(‘q306’)>=15 && (data(‘q2401_1’)>0 || data(‘q2401_2’)>0 ))

Thanks, Caroline,
now it’s more clear :slight_smile: