Managing cascading select questions for a very large question choices

Thanks, I will allow @tomisin to respond because we working on the same issue. But I will appreciate it if this is resolved timely because participants are in the field already.

OK.

While archiving and deploying a new form solves part of our problem,

  1. We have a Power BI based dashboard linked directly to the Kobocollect survey data which we might have issue with if a new version is deployed.
  2. Since the data cannot be merged automatically, reentering the survey questions manually will require a large human resources which we don’t have.

NB: Having issues getting the form, we observed that using the older version of the Kobocollect App, we were able to get the form successfully for the same survey.

1 Like

So you mean you were finally able to get the survey project in your KoBoCollect android app when using the later version of KoBoCollect android app?

Yes, I have tried using the v1.27.3, v1.29 and v1.14.0a. Even though it returned error, the form was gotten successfully.

Sorry could not copy it correctly. You mean you were able to get them successfully?

Yes, I got the form successfully.

1 Like

Great to know you finally succeeded! Could you let the community know which version of the Collect android app you used at the moment?

v1.27.3, v1.29 and v1.14.0a.

It still returns error, but the form was downloaded.

Would you mind using the latest version of the KoBocollect android app v1.29.3. I still don’t get you correctly:

Could you simplify what you intend to describe here.

This version still could not get blank forms… still showing failure

OK would you wish to give a try with ODK Collect v1.29.5. Let’s see what happens.

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

2 Likes

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