Concatenating strings and newlines

Does anyone know is there is any way to use join() or concat() in a calculated field in such a way that newlines can be inserted in the resulting string?

I've tried:

concat('A','
','B')

and

join('
','A','B')

The newlines are in the form .xml (so it isn't an XLSForm issue), but get replaced by spaces in the calculated field (using ODK Collect 1.4.7).

Thanks

Hi James,

The new version of Collect 1.4.9 and later have support for HTML tags.

concat('A','
','B') should give you the behavior you want.

Yaw

··· -- Need ODK consultants? Nafundi provides form design, server setup, in-field training, and software development for ODK. Go to https://nafundi.com to get started.

On Tue, Apr 5, 2016 at 12:32 PM, james.beard.tz@gmail.com wrote:

Does anyone know is there is any way to use join() or concat() in a calculated field in such a way that newlines can be inserted in the resulting string?

I've tried:

concat('A','
','B')

and

join('
','A','B')

The newlines are in the form .xml (so it isn't an XLSForm issue), but get replaced by spaces in the calculated field (using ODK Collect 1.4.7).

Thanks

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups "ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cool. Thanks very much.

··· On Tuesday, 3 May 2016 11:03:49 UTC, Yaw Anokwa wrote: > Hi James, > > The new version of Collect 1.4.9 and later have support for HTML tags. > > concat('A','
','B') should give you the behavior you want. > > Yaw > -- > Need ODK consultants? Nafundi provides form design, server setup, > in-field training, and software development for ODK. Go to > https://nafundi.com to get started. > > On Tue, Apr 5, 2016 at 12:32 PM, wrote: > > Does anyone know is there is any way to use join() or concat() in a calculated field in such a way that newlines can be inserted in the resulting string? > > > > I've tried: > > > > concat('A',' > > ','B') > > > > and > > > > join(' > > ','A','B') > > > > The newlines are in the form .xml (so it isn't an XLSForm issue), but get replaced by spaces in the calculated field (using ODK Collect 1.4.7). > > > > Thanks > > > > -- > > -- > > Post: opendatakit@googlegroups.com > > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > > Options: http://groups.google.com/group/opendatakit?hl=en > > > > --- > > You received this message because you are subscribed to the Google Groups "ODK Community" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit+unsubscribe@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout.

If I want to show each value of the nodeset captured in a join(separator, nodeset) in a new line in a note, what value do I use for seperator?

for example if there are 3 alphabets in the nodeset A,B and C and for seperator i use ','
the result in note is

A,B,C

but I want it to appear as

A
B
C

You can use the HTML tag '<br/>' as separator to get each member of your nodeset on a new line
join('<br/>',nodeset)