Managing cascading select questions for a very large question choices

Already done same issue

With which Collect version were you able to get it?

ODK Collect v1.29.5

But if I deploy the same xlx file with a new name - in kobocollect, it will work successfully

But the challenge would be it will become a new form with zero submission

Could the problem is the over 15,000 submissions?

Sorry, this is not working again.

@tomisin am thinking we could archive this form and deploy new one may to start from tomorrow, since we are unable to resolve this issue.

The same xlx fill named iMSV troubleshooting is working well and I think we go with this option.

However, will you be able to link the two kobo forms (the as archived and the live) to the powerBI Dashboard. If yes, that would be fine and our CSV legacy would download with ease.

@Kal_Lam see what we are saying

All iMSV forms has failure

Hi @cchukwu
I would like to propose an entire different approach to getting this form to work. This will however require that you do some work on your end to customize the form on the cascade selection using the following instructions.

Approach 1: Using search () in the appearance column.

NOTE:

  1. This method will only work on the android collect application. The original writeup can be found here (XLSForm Docs).

  2. This method does not need you to execute choice_filter for cascade questions since this is done using one of the search functions i.e. matches (see below)

Step 1 : In the XLSForm, within the survey sheet, specify select_one listname or select_multiple listname in the type column (where listname is the name of your choice list) as you would normally do when defining a select_one or select_multiple respectively.

image

Step 2 : On the appearance column (survey sheet), define the search function as you would desire.

There are five ways you can use the search function:

  • contains - this will check and return all the items in the csv column you need but only for rows which the filtration column contains the specified parameter within any part of the text in the filtration column.
  • beginswith - this will check and return all the items in the csv column you need but only for rows which the filtration column beginswith with the specified parameter.
  • endswith - this will check and return all the items in the csv column you need but only for rows which the filtration column endswith with the specified parameter.
  • matches - this will check and return all the items in the csv column you need but only for rows which the filtration column matches the specified parameter in full to the specified parameter.
  • You can also use search without any of the four elements, in this case, you will have the entire list without any filtration applied.

Please note for YOUR ISSUE, we are using the “matches” approach and the search without any additional function.

You will define your search in the column as follows:

search (‘nameofcsv’, ‘matches’, ‘filtercolumnincsv’, ${questionnameinxlsform})

In this example, we are using a csvfile known as countriesbyregions to get various lists.

image

To understand the example, see the structure of the used CSV file.

image

If you need to use any other appearance style such as minimal, you will need to define it before the search appearance followed by a space e.g. minimal search () or minimal autocomplete search ()

image

Step 3: On the choices sheet of your XLSForm, you will need to define how your list will be built from the csv file:

  • list_name column: specify the name of your choice list as you normally would.
  • name column: include the name of the .csv column to use for uniquely identifying selected choices.
  • label column: include the name of the .csv column to use for labelling the choices.
    Note: If you wish to include multiple columns in the labels, include a comma-separated list of all columns to include. The name column will be dynamically populated based on the column name you put there, and the label column will be dynamically populated based on the column name(s) you put there.
  • In your choices worksheet row, you may also include a .csv column name in the image column. If you do, the image filename to use will be pulled from the specified .csv column.
    Note: If you refer to image files in this way, you must always upload those image files as media file attachments when you upload your form to the server.

image

Using our example, the definition in the choices sheets will be as follows (look at our earlier CSV)

image

Note:

  • The contents of the columns within the csv that will provide the contents of the name, must meet all the requirements of creating a name in the XLSForm choices sheet.
  • If you need to pull the label for multiple languages, you can still specify the column that provides them using the same approach above.

Step 4: Upload and deploy your XLSForm as normal. Then upload the csv within the media section as shown below

image

I would suggest you follow the above procedure on the cascade select so that we look at it together.

Regards,
Stephane

1 Like

Thanks @stephanealoo, we will get back to you on this shortly

But I hope you won’t mind us sending you our xls form incase we are finding it difficult to apply your suggestions?

1 Like

No problem at all, kindly do send the XLS form once you have amended it, I will surely look at it.

@stephanealoo

Thanks so much for the guide.

We have followed the instructions as directed, however, after replacing the form with the existing form that is being used currently for the data collection, the same error of ‘failure’ to get the selected blank form still persists.

Thanks in anticipation of other possible solutions. Attached are the two files (XLS form and the CSV.
hf.csv (2.4 MB) National iMSV Checklist (NMEP) - Search.xlsx (40.1 KB) external file).hf.csv (2.4 MB) National iMSV Checklist (NMEP) - Search.xlsx (40.1 KB)

Nothing changed. But my worry why is affecting only this form, including the training version.

@Kal_Lam , and @stephanealoo we have not heard, please it seems there is no solution.

@tomisin, we might go ahead and upload a new xlxform

@cchukwu, cc: @tomisin kindly please be informed that our team is investigating your issue. Also please note that it may take some time.

Thanks @Kal_Lam , I don’t know if it’s an app problem because kobocollect version 1.27.3 also fails but we access the form while the current version 1.29.3 will show failure and you can’t access the form from the fill blank form…

Hi @cchukwu
Kindly confirm that when you upload this form as a new project, you are actually able to get it to work.

Stephane

@stephanealoo

Yes, when it was uploaded as a new project, it worked perfectly well.

@tomisin let’s try to change the name of the project and redeploy because the training version which I unarchived yesterday has the same issue.

So let’s change National iMSV Checklist (NMEP)

To

iMSV National_NMEP Checklist

@tomisin , for the purpose of learning, kindly explain to the community how we were able to resolve the issue. Thank you.

1 Like

Thanks for the remainder @cchukwu

@stephanealoo and @Kal_Lam, we have been able to resolve the lingering challenge of getting the XLS form on the KoboCollect APP, thank you so much for the support.

While we tried out so many steps and couldn’t really trace to the exact solution, one major thing was the removal of the media file on the document. We have not added it again since then, but that was a major step aside from the conversion of the choices to an external file as you have advised.

Thanks to the community and best regards.

2 Likes