Multi-select delimiter: space or '|'?

So I'm 99.9% certain when I played with this last year, by looking at the raw data getting pushed back up into ODK Aggregate, that when you had multiple values selected in a multi-select control, the substrings were delimited from each other with a vertical bar '|'.

But now, I'm looking at what Kobo/Enketo - as well as the online docs (eg selected()) and clearly the delimiter is a space. So am I going crazy (or prematurely senile), or did this change recently?.. :slight_smile:

It’s always been a space as far as I know!

2 Likes

Yup same for me. I have never seen a pipe in there.

Space (working since 2013 with odk)

thanks all for confirming I'm going crazy... :slight_smile:

[so in my defense, I dug into the original source code I started with - ocRosa, circa 2011 - and found that indeed it was using '|' for its select-multi delimiter. Maybe waaaaay back in the early days javaRosa used a '|'? :man_shrugging: Anyway, thnx again.

BTW, in case anybody lands here and asks the obvious - "So what happens if you accidentally use a space in your select-multi value?" - answer is you are not allowed to do that. Per XForms 1.1 spec:

A limitation of the XML Schema list datatypes is that white space characters in the storage values
(the value element) are always interpreted as separators between individual data values. 
Therefore, authors should avoid using white space characters within storage values with list simpleContent.

Incorrect Type Declaration:

<item>
  <value>United States of America</value>
  ...
</item>

When selected, this item would introduce not one but four additional selection values:
 "America", "of", "States", and "United".