Choice filter option in Kobo please support with checking the syntax of xls form

Dear support group,
I am a beginner in Kobo and ODK and I am try to understand the what is correct syntax for choice filter. I know this feature exist in ODK and found in this forum examples to program XLS.

background
my survey asks first 1) what is your country? 2) then What district are you from, in this country?
I want to KoBo to show the list of districts depending on the country selected.

I have 2 countries (Zimbabwe and Nepal) and 10 Districts (7 from Zimbabwe, and 3 from Nepal).

I set the xls form you see in attchment and upload without errors in KoBo. However, in Enketo, ALL (10) districts are visuaized.
this is from Survey tab:
Snapt to KoBoCom|690x155

This is from Choice tab:
Snap_choice to KoBoCom !

Many thanks for those who can help

Hi @Lavinia,

Welcome to the community! You could design a cascading select question by your own following the instructions outlined in the support article here.

Additionally, you could also have a look to some examples that has been discussed in the community forum here.

Have a great day!

1 Like

Hi there!
I have tried again and also tried to more simply create multiple questions with conditional display if opion 1, 2 or 3 from previous questions were selected.

No improvement on my account, while, if a friend tried on his account it works…
I suspect a bag.

What shall i do?

Snap_cascadingselect_choice_tab

Hi
Could you please do the following:

  1. Change everything labeled ty6wl08 to district in both the choices and answers sheet
  2. Change ty6wl08=${district} to be ${district}=${district}

Then upload and test this; it should work

Stephane

1 Like

Hi Stephane,
Thanks for your reply.
unfortunately, I tried with no success. Here my screen shots and files.
From survey tab:
cascadingselect_aftersuggestion_choice

This should work based on what you have designed. Change the order column to come after the district column. Could you try deploy and see if this sorts the issue?

Dear Stephane,

Thanks for your suggestion again. No success even after changing the column order.
I make a more simpler version of the questionnaire. I did the following:

  • eliminated the district for which I do not have villages name yet, thinking that maybe the fact that the villages list is not complete, could cause troubles.
  • I also make all variable names in small letters (before I had capitals)
  • move choice_filter next to label as well as “district” next to label in choice tab.
  • I also checked for spaces next/in between,after all variable names and in choice_filter

So now, I have 2 district (Tsholotsho and Mudzi) and 11 Villages (6 for Mudzi and 5 for Tsholotsho), and the choice_filter script as ${district}=${distrcit}
I deployed, no success.

Anything else?
Once again, thanks for your kind response!
Lavinia

Hi @Lavinia,

Could you list down the village name under the respective district name so that we could help you sketch out a sample xlsform which should work.

Have a great day!

Dear Kal,
thanks to you as well for your support.
here the files:cascadingselect_onlydistricts.xlsx (10.7 KB)

Hi @Lavinia,

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

In the survey tab of the xlsform:

In the choices tab of the xlsform:

Image 2

Data entry screen as seen in Enketo (while selecting Tsholotsho district):

Data entry screen as seen in Enketo (while selecting Mudzi district):

Reference xlsform:
cascadingselect_onlydistricts.xlsx (11.5 KB)

Have a great day!

1 Like