Line breaks while concatenating values in default text

I am trying to generate a multi-line string as default value for a text
type node but neither of the following works:

concat('line1: ', ${calc1}, '
', 'line2: ', ${calc2}, '
',
'line3: ', ${calc3})

concat('line1: ', ${calc1},
, 'line2: ', ${calc2},
, 'line3:
', ${calc3})

concat('line1: ', ${calc1}, '
', 'line2: ', ${calc2}, '
', 'line3: ', ${calc3})

I am trying to produce something like this (or see attached screenshot):

line1: 99
line2: 99
line3: 99

Is there a way to insert line breaks dynamically?

··· -- -- Nik Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop me an email.

Nik,

I believe that you can only include static text or numbers within default
values -- so it would seem that your bigger issue is including the
calculated field values, not the line breaks.

This is actually something we've been working on for our next SurveyCTO
release: adding support for calculated field defaults (which, in turn,
allows for pulling field defaults from pre-loaded .csv files). Essentially,
we left the existing default behavior alone (static defaults that are
loaded with the form), then added support for expressions in the
calculation column of text, numeric, and other UI fields to specify the
default. In the case where such an expression is specified, it is evaluated
the first time the field is displayed (which is generally what you want).

Best,

Chris

··· On Wed, Feb 26, 2014 at 1:24 AM, ゴー・ニコライ wrote:

I am trying to generate a multi-line string as default value for a text
type node but neither of the following works:

concat('line1: ', ${calc1}, '
', 'line2: ', ${calc2}, '
',
'line3: ', ${calc3})

concat('line1: ', ${calc1},
, 'line2: ', ${calc2},
, 'line3:
', ${calc3})

concat('line1: ', ${calc1}, '
', 'line2: ', ${calc2}, '
', 'line3: ', ${calc3})

I am trying to produce something like this (or see attached screenshot):

line1: 99
line2: 99
line3: 99

Is there a way to insert line breaks dynamically?

--

Nik
Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop
me an email.

--

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/groups/opt_out.

Actually, Chris, the calculated values work fine, my only issue are the
line breaks.

··· On Wednesday, February 26, 2014, Christopher Robert wrote:

Nik,

I believe that you can only include static text or numbers within default
values -- so it would seem that your bigger issue is including the
calculated field values, not the line breaks.

This is actually something we've been working on for our next SurveyCTO
release: adding support for calculated field defaults (which, in turn,
allows for pulling field defaults from pre-loaded .csv files). Essentially,
we left the existing default behavior alone (static defaults that are
loaded with the form), then added support for expressions in the
calculation column of text, numeric, and other UI fields to specify the
default. In the case where such an expression is specified, it is evaluated
the first time the field is displayed (which is generally what you want).

Best,

Chris

On Wed, Feb 26, 2014 at 1:24 AM, ゴー・ニコライ <nikolai.go@gmail.com<javascript:_e(%7B%7D,'cvml','nikolai.go@gmail.com');> wrote:

I am trying to generate a multi-line string as default value for a text
type node but neither of the following works:

concat('line1: ', ${calc1}, '
', 'line2: ', ${calc2}, '
',
'line3: ', ${calc3})

concat('line1: ', ${calc1},
, 'line2: ', ${calc2},
,
'line3: ', ${calc3})

concat('line1: ', ${calc1}, '
', 'line2: ', ${calc2}, '
', 'line3: ', ${calc3})

I am trying to produce something like this (or see attached screenshot):

line1: 99
line2: 99
line3: 99

Is there a way to insert line breaks dynamically?

--

Nik
Need help customizing Survey Instruments/Tools/Forms for ODK Collect?
Drop me an email.

--

Post: opendatakit@googlegroups.com<javascript:_e(%7B%7D,'cvml','opendatakit@googlegroups.com');>
Unsubscribe: opendatakit+unsubscribe@googlegroups.com<javascript:_e(%7B%7D,'cvml','opendatakit%2Bunsubscribe@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<javascript:_e(%7B%7D,'cvml','opendatakit%2Bunsubscribe@googlegroups.com');>
.
For more options, visit https://groups.google.com/groups/opt_out.

--

Post: opendatakit@googlegroups.com<javascript:_e(%7B%7D,'cvml','opendatakit@googlegroups.com');>
Unsubscribe: opendatakit+unsubscribe@googlegroups.com<javascript:_e(%7B%7D,'cvml','opendatakit%2Bunsubscribe@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<javascript:_e(%7B%7D,'cvml','opendatakit%2Bunsubscribe@googlegroups.com');>
.
For more options, visit https://groups.google.com/groups/opt_out.

--

Nik
Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop
me an email.

Sorry, then, that I can't be of any help here. I have no idea when, how, or
by what that expression of yours is being evaluated. I just tried another
few tests here, and whatever I put in the default column for a *text *field
is treated as a literal. Thus, line breaks are no problem, but getting
concat() or field references to evaluate is a problem.

Chris

··· On Wed, Feb 26, 2014 at 8:52 PM, ゴー・ニコライ wrote:

Actually, Chris, the calculated values work fine, my only issue are the
line breaks.

On Wednesday, February 26, 2014, Christopher Robert crobert@surveycto.com wrote:

Nik,

I believe that you can only include static text or numbers within default
values -- so it would seem that your bigger issue is including the
calculated field values, not the line breaks.

This is actually something we've been working on for our next SurveyCTO
release: adding support for calculated field defaults (which, in turn,
allows for pulling field defaults from pre-loaded .csv files). Essentially,
we left the existing default behavior alone (static defaults that are
loaded with the form), then added support for expressions in the
calculation column of text, numeric, and other UI fields to specify the
default. In the case where such an expression is specified, it is evaluated
the first time the field is displayed (which is generally what you want).

Best,

Chris

On Wed, Feb 26, 2014 at 1:24 AM, ゴー・ニコライ nikolai.go@gmail.com wrote:

I am trying to generate a multi-line string as default value for a text
type node but neither of the following works:

concat('line1: ', ${calc1}, '
', 'line2: ', ${calc2}, '
',
'line3: ', ${calc3})

concat('line1: ', ${calc1},
, 'line2: ', ${calc2},
,
'line3: ', ${calc3})

concat('line1: ', ${calc1}, '
', 'line2: ', ${calc2}, '
', 'line3: ', ${calc3})

I am trying to produce something like this (or see attached screenshot):

line1: 99
line2: 99
line3: 99

Is there a way to insert line breaks dynamically?

--

Nik
Need help customizing Survey Instruments/Tools/Forms for ODK Collect?
Drop me an email.

--

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/groups/opt_out.

--

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/groups/opt_out.

--

Nik
Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop
me an email.

--

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/groups/opt_out.

Sorry Chris, I forgot to write that I used concat() in calculate to
generate the default text.

··· On Thursday, February 27, 2014, Christopher Robert wrote:

Sorry, then, that I can't be of any help here. I have no idea when, how,
or by what that expression of yours is being evaluated. I just tried
another few tests here, and whatever I put in the default column for a *text
*field is treated as a literal. Thus, line breaks are no problem, but
getting concat() or field references to evaluate is a problem.

Chris

On Wed, Feb 26, 2014 at 8:52 PM, ゴー・ニコライ nikolai.go@gmail.com wrote:

Actually, Chris, the calculated values work fine, my only issue are the
line breaks.

On Wednesday, February 26, 2014, Christopher Robert crobert@surveycto.com wrote:

Nik,

I believe that you can only include static text or numbers within default
values -- so it would seem that your bigger issue is including the
calculated field values, not the line breaks.

This is actually something we've been working on for our next SurveyCTO
release: adding support for calculated field defaults (which, in turn,
allows for pulling field defaults from pre-loaded .csv files). Essentially,
we left the existing default behavior alone (static defaults that are
loaded with the form), then added support for expressions in the
calculation column of text, numeric, and other UI fields to specify the
default. In the case where such an expression is specified, it is evaluated
the first time the field is displayed (which is generally what you want).

Best,

Chris

On Wed, Feb 26, 2014 at 1:24 AM, ゴー・ニコライ nikolai.go@gmail.com wrote:

I am trying to generate a multi-line string as default value for a text
type node but neither of the following works:

concat('line1: ', ${calc1}, '
', 'line2: ', ${calc2}, '
',
'line3: ', ${calc3})

concat('line1: ', ${calc1},
, 'line2: ', ${calc2},
, 'line3:
', ${calc3})

concat('line1: ', ${calc1}, '
', 'line2: ', ${calc2}, '
', 'line3: ', ${calc3})

I am trying to produce something like this (or see attached screenshot):

line1: 99
line2: 99
line3: 99

Is there a way to insert line breaks dynamically?

--

Nik
Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop
me an email.

--

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, se

--

Nik
Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop
me an email.