Cascading select showing choice not selected in previous answer


I’m working on a form where I’m using cascading select for some questions, including one repeat based on the selection.

My problem now is that I need to set 2 multiple choice questions, among others:

Q1 is cascading selection from a previous question Q0. I set the choice filter and works well cf=${Q0}

Q2 should contain the options NOT selected in the Q1.

I did the Q2 adding not(selected(${Q1},name)) to the choice filter, which now is: cf=${Q0} and not(selected(${Q1},name))

It works, but the issue is that the form is very slow due to the number of choices to filter. I’m wondering if there is a way to start from the selection already done in Q1, so to avoid repeating cf=${Q0} in Q2 choice filter.

For data collection, I will use mostly the web form (Enketo).

Thanks in advance!

Hi @Giuliano,

Welcome to the community!

Regarding your concern:

Yes, generally if you have a lot of choices, the loading should be slow.

Would you mind sharing your xlsform (keeping only the specific questions) so that we could figure out a way which loads quicker.

Have a great day!

Thanks @Kal_Lam.
As new user I cannot upload the form, but the screenshot is below:

The issue is on Q2 but maybe I should change my overall strategy.
Kindly consider that in the choice sheet I have a list of around 2000 names.

Have a great day you too!

Hi @Giuliano,

Thank you for sharing the screenshot. But would appreciate if you could share the xlsform (to the entire community). Would you mind refreshing your page and then try sharing it again.

Have a great day!

1 Like

Sorry @Kal_Lam, but I still cannot upload any file

Hi @Giuliano,

Would you mind trying it now?

Have a great day!

Working now! Thanks a lot!

cascading_not selected.xlsx (54.5 KB)

1 Like

Hi @Giuliano,

So looking at your requirement, you could design your xlsform as outlined below using select_one_from_file and select_multiple_from_file:

In the survey tab of your xlsform:

In the choices tab of your xlsform:

Image 2

In the csv file:

Image 3

Data entry screen as seen in Enketo:

Reference xlsform:

select_one_from_file.xlsx (16.4 KB)

Reference csv file:

School_Code.csv (44.0 KB)

Have a great day!


Thanks a lot for your valuable support!
Just one question: is select_from_file working on Kobo app or on Enketo only?

1 Like

Hi @Giuliano,

Kindly please be informed that the current version of KoBoCollect v1.25.1 does not support select_one_from_file while ODK Collect v1.27.1 and above should support the same. Also please be informed that Enketo should support the same. Would also like to add that KoBoToolbox is soon planning to release KoBoCollect v1.27.1 which should also support the same. Until then we would recommend and advise users to use ODK Collect v1.27.1 and above for the same.

Have a great day!

1 Like