I don’t get comma separated values in the Select many answers

Hi,

I’m having a different result. I’m using the following export options:

  • Export type: Excel
  • Value and header format: English
  • Export Select Many questions as: Single column

I don’t get comma separated values in the Select many answers. They’re only separated by a space, which can be confusing if the options themselves are composed by multiple words (naturally separated by spaces).

The following article talks about Exporting data but doesn’t mention anything about commas at all. So I’m a bit confused… is it possible to get comma separated values, or not?

@peat @Josh_Hods @Kal_Lam what’s your experience with this?

Edit:

I tested changing Value and header format to “XML values and headers”, it still doesn’t use commas, it’s still separated with spaces. But, because the options are one word (or multiple words connected with underscores), the separation with a space don’t present that much of a problem.

My question remains… are we supposed to get comma separated values when using English values and Single column?

@IAR, the system currently does not support the feature you are seeking. However, you should be able to achieve this by exploiting the XLSForm as shown in the screenshots below:

In the survey tab of your XLSForm:

In the choices tab of your XLSForm:

Data entry screen as seen in Enketo:

Data>Table View:

Reference XLSForm:

Select Multiple Test.xlsx (9.5 KB)

1 Like

As @Kal_Lam correctly states, there is presently no way to introduce a new delimiter (eg comma) to the Single Column value exported for a select-multiple question; it’ll either be the space-separated values [which is actually how the response is stored in the submission XML], or with the labels substituted in place of the raw values, but again space-separated.

What you can do, instead - and in perhaps a bit more of generalization than the above - is put in an additional calculation into your form to calculate the desired comma separated response value, which will then be included in the submission data as an alternative format. For this you can use a repeat loop to iterate thru all the selected values, selected-at() to pull out each value, jr:choice-name() to get the label for each selected value, and then finally a join() to put all these labels into a single (and comma separated!) string response:

SelectMultiLabels.xlsx (18.6 KB)

Tested under Enketo:

and KoboCollect:

2 Likes

Thank you!! @Xiphware @Kal_Lam

This is a good idea… for future projects :slightly_smiling_face:

1 Like