I am trying to build the following with one_select type questions:
Q1: Name of the enumerator
Paul
Lisa
Marie
Alain
Q2: Selection of district
Mahajanga
Marovoay
As Paul and Lisa only work in Mahajanga, I would like to automatically show in Q2 that as selected answer. Whereas Mary and Peter work in the other district.
I put the following if-statement the calculation column, and it works in Enketo but I receive an error message when used in KoboCollect
if((${Q1}=‘Paul’ or ${Q1}=‘Lisa’),‘Mahajanga’,if((${Q1}=‘Marie’ or ${Q1}=‘Alain’),‘Marovoay’,0))
Hey @Kal_Lam
Thanks for your swift reply! The if-statement works for me in Enketo, but I get an error message in KoboCollect when I try to answer the first question, as seen in the screenshot:
After that, the form crashes and I am taken back to the main menu.
Hi @Kal_Lam ,
it took me a few days to get back to this.
Indeed, it works now with a similar if-statement like you provided in the example.
Initially I had tried to use another if-statement in a following question but that somehow caused problems in KoboCollect. Once I took out the choice_filter I had initially defined for that question, it worked.
Thanks again!!
Is it 1 enumerator for each district? then you can just select the enumerator and it will select the district using the number. Prefill one on one.xlsx (11.4 KB)