Choices code starting with '0'

Hi!

What to do if I have question type ‘select one’ of which XML values are coded as three digit numbers with leading zeros. I want to preserve those leading zeros for concat function in following calculate type question.

Thanks

@peeyush, maybe you could do it as outlined in the image shared below:

Image as seen in the Formbuilder:

Image when the XLSForm is downloaded as XLSForm:

Image 2

In both cases, the 0 is visible.

Hint: In Excel you can:

  • Enter '001 (with starting ', marking a text format)
  • Customize the “number” format of the name column to show leading 0s.

It is only an Excel issue. XLS/Kobo stores choice names always as string.

If you transfer the Excel export to other tools, e.g. SPSS, you may need to adapt there again to keep the leading 0s.

1 Like