Cascading Select conflicting

Hi All,

I am working on a form: client_locator_form2.xlsx (18.1 KB). I have a few questions as the following:

  • When I am using cascades, the options are appearing as expected
  • I need to have the location selection option twice and I tried to achieve that in the following ways
    • By adding the choice filter option
    • Adding another cascades tab
    • Or Reusing same cascades twice (not sure how to do that)
  • When I am using cascades and choice filter together, its conflicting with each other

Help will be highly appreciated. I am completely stuck at this point.


@A.N.M_AL-IMRAN: I am currently reviewing your file. Please, by location selection, are you referring to the recording of GPS or selection of your districts, sub-county and their corresponding health facilities?

@A.N.M_AL-IMRAN: Please, find attached my review of your file. My inputs are in red bold fonts. Kindly check all 3 sheets. Thank you.
fad_client_locator_form2.xlsx (19.9 KB)

Thanks, @Fadl. However, I am trying to have option as the following:

  • I need have option to insert Province>District>Subcounty etc. twice. First I need to add that as address of the facility and secondly as the address of the patient. And I have tried to achieve that is different ways; however, they are conflicting with each other.

Is there any way to use cascades sheet twice? Help from anyone will be highly appreciated.

Thanks once again,

Hello @A.N.M_AL-IMRAN! Do you want the address of the facility to be same as the address of the patient?

If yes, you can pull the initial selections of Province>District>Subcounty etc and use the acknowledgement feature. That would avoid conflict of chosen options. In my attached file, you may check row 2, 20 and 21.

fad2_client_locator_form2.xlsx (19.5 KB)

Thank you.

1 Like

Dear @Fadl,

Thanks so much, the tips are very helpful. However, I am looking for actually inserting the data twice. I need to insert Province>District>Subcounty>Health Facility then for Patient I need to insert Province>District>Subcounty. I know it does not sound practical, but thats our requirement at present.

When I am trying to call the lists twice, I am having an issue with the form. Two lists are conflicting with each other. Is there any way that I can use cascades twice? On first stem I want insert Province>District>Subcounty>Health Facility and then on second step Province>District>Subcounty.

Thanks again,

@A.N.M_AL-IMRAN where did you come across documentation for cascading_select? I see that it's in pyxform as a convenience generator for cascading selects but it's not in any documentation that I can see. For example, the XLSForm website shows how to build the cascade from a series of choice filters:

Looking at the form, it looks to me like you want to go through the province > district > subcounty selection twice because the health facility and the client may not be from the same place, right? That would be a totally reasonable requirement.

In that case, you want to ask for two unrelated provinces, districts and subcounties and use separate filters. client_locator_form2.xlsx (10.9 KB) is an example that shows this.

The changes I made:

  • removed usage of cascading_select because it doesn't give enough control
  • added health facilities to your choices sheet
  • gave different names to the values collected for the facility and the client (e.g. hf_region and client_region)
  • adjusted the choice filters for each cascade to use the appropriate values. For example, region=${hf_region} filters down the districts based on the health facility region provided and region=${client_region} filters down the districts based on the client region provided
1 Like

Dear @LN,

Good question! In fact I am also confused about the cascades sheet. I found this cascading_select from one of my colleague and I was wondering where has he got that form? And that is still a big mystery to me as I never found it anywhere in the ODK documentation! I have no idea but I really liked it and it looks more convenient and I adopted that. However, initially, I used to follow the choice_filter as describes on your link.

Thanks so much for such great support as always. My issues have completely been resolved.

Special thanks to @Fadl for being so supportive.

Thanks again,

1 Like