Hello community, i have an issue.
There is select_multiple question (Question1) which has several options, and one of them - “person’s age 65+”. After this question, there is roster (Question2), which is asking for gender and age.
I want that warning note must appear with the warning, in case of selecting in Question1 an option “person’s age 65+”, but there will be no persons in Question2 with the age 65+.
So i already have done the counter which counts people 65+ in Question2. And it works good. So my note appear when option “person’s age 65+” selected, and only it. But if there are “person’s age 65+” option, and any another option (a.e. “Pregnant”, or “Disabilities”), my warning note doesn’t appears.
My two variants of formula for “note” in “Skip logic” is:
- “((${_Status}=‘_65+’ and count-selected(_Status) >= 1) or (${_Status}=‘_65+’ )) and ${_65plus_amount}=0”
- “((${_Status}=‘_65+’ and count-selected(_Status) >= 1) and ${_65plus_amount}=0) or (${_Status}=‘_65+’ and ${_65plus_amount}=0)”
Where: _Status = select_multiple question =Question1;
_65plus_amount = result of calculator which counts people 65+;
But unfortunatelly nothing works.
Could you help me with proper formula? I have attached to googledrive this XLSForm kobo_sample.xlsx - Google Sheets
The better option will be constraint of course, so called “hard constraints” - “Notes can also be used for “hard” constraints that should be permanently displayed until they are resolved by using the technique above and setting required to true()” (Form Logic - ODK Docs). But I’ve given up.