# Multiple values in one field

**URL:** <https://forum.servoy.com/t/multiple-values-in-one-field/9910>\
**Category:** Classic Servoy\
**Created:** [November 21, 2008, 10:41am UTC](https://forum.servoy.com/t/multiple-values-in-one-field/9910 "2008-11-21T10:41:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![martinh](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@martinh](https://forum.servoy.com/u/martinh)\
**Post date:** [November 21, 2008, 10:41am UTC](https://forum.servoy.com/t/multiple-values-in-one-field/9910/1 "2008-11-21T10:41:49Z")

</div>

Hello,

We just noticed that you can put a string field on the form of type Checkbox and link it to a valuelist with multiple values  
What we see is that the dataprovider contains the ID-values separated by some character  
What is this for a character and how can I use this string in script to access all these values?  
Can it be converted to an array?

Martin

---

<div class="post-metadata">

**Author:** ![ars](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@ars](https://forum.servoy.com/u/ars)\
**Post date:** [November 21, 2008, 12:58pm UTC](https://forum.servoy.com/t/multiple-values-in-one-field/9910/2 "2008-11-21T12:58:53Z")

</div>

Hi Martin,

> martinh:  
> What is this for a character

This is a new line character.

> martinh:  
> Can it be converted to an array?

Yes, Use the split() method of Array to do the same.

Hope it helps.

---

<div class="post-metadata">

**Author:** ![martinh](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@martinh](https://forum.servoy.com/u/martinh)\
**Post date:** [November 21, 2008, 1:05pm UTC](https://forum.servoy.com/t/multiple-values-in-one-field/9910/3 "2008-11-21T13:05:17Z")

</div>

How do you use a new line character in split funtion:

something like:

string.split(char(10)) or string.split(0x0a)

But both do not work …

---

<div class="post-metadata">

**Author:** ![ars](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@ars](https://forum.servoy.com/u/ars)\
**Post date:** [November 21, 2008, 1:07pm UTC](https://forum.servoy.com/t/multiple-values-in-one-field/9910/4 "2008-11-21T13:07:06Z")

</div>

Try with string.split(“\n”)

---

<div class="post-metadata">

**Author:** ![martinh](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@martinh](https://forum.servoy.com/u/martinh)\
**Post date:** [November 21, 2008, 4:03pm UTC](https://forum.servoy.com/t/multiple-values-in-one-field/9910/5 "2008-11-21T16:03:36Z")

</div>

Yes perfect, that works!
