# Multi-select delimiter: space or '|'?

**URL:** <https://forum.getodk.org/t/multi-select-delimiter-space-or/14255>\
**Category:** Development\
**Created:** [July 26, 2018, 9:59pm UTC](https://forum.getodk.org/t/multi-select-delimiter-space-or/14255 "2018-07-26T21:59:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xiphware](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/xiphware/32/2587_2.png) [@Xiphware](https://forum.getodk.org/u/Xiphware)\
**Post date:** [July 26, 2018, 9:59pm UTC](https://forum.getodk.org/t/multi-select-delimiter-space-or/14255/1 "2018-07-26T21:59:45Z")

</div>

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()](https://docs.opendatakit.org/form-operators-functions/#select-functions)) and clearly the delimiter is a space. So am I going crazy (or prematurely senile), or did this change recently?.. 🙂

---

<div class="post-metadata">

**Author:** ![LN](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/ln/32/1605_2.png) [@LN](https://forum.getodk.org/u/LN)\
**Post date:** [July 27, 2018, 1:47pm UTC](https://forum.getodk.org/t/multi-select-delimiter-space-or/14255/2 "2018-07-27T13:47:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tomsmyth](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/tomsmyth/32/1726_2.png) [@tomsmyth](https://forum.getodk.org/u/tomsmyth)\
**Post date:** [July 27, 2018, 6:38pm UTC](https://forum.getodk.org/t/multi-select-delimiter-space-or/14255/3 "2018-07-27T18:38:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Dominik](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/dominik/32/11296_2.png) [@Dominik](https://forum.getodk.org/u/Dominik)\
**Post date:** [July 27, 2018, 7:04pm UTC](https://forum.getodk.org/t/multi-select-delimiter-space-or/14255/4 "2018-07-27T19:04:31Z")

</div>

Space (working since 2013 with odk)

---

<div class="post-metadata">

**Author:** ![Xiphware](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/xiphware/32/2587_2.png) [@Xiphware](https://forum.getodk.org/u/Xiphware)\
**Post date:** [July 27, 2018, 9:34pm UTC](https://forum.getodk.org/t/multi-select-delimiter-space-or/14255/5 "2018-07-27T21:34:00Z")

</div>

thanks all for confirming I'm going crazy... 🙂

[so in my defense, I dug into the original source code I started with - [ocRosa](https://github.com/dankrywenky/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 '|'? 🤷‍♂️ Anyway, thnx again.

---

<div class="post-metadata">

**Author:** ![Xiphware](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/xiphware/32/2587_2.png) [@Xiphware](https://forum.getodk.org/u/Xiphware)\
**Post date:** [July 27, 2018, 11:42pm UTC](https://forum.getodk.org/t/multi-select-delimiter-space-or/14255/6 "2018-07-27T23:42:57Z")

</div>

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](https://www.w3.org/TR/xforms11/#ui-submit):

```
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".

```
