Get the XML instance name of a saved form and show more detail in "go to prompt" interface

Hi

I need two things:

A) I need to put in a calculate question the corresponding XML instance
name of of the current form. Is there a function to get that name?

type

name

calculation

calculate

cInstanceName

‘MySurvey_2013-08-20_10-55-34’

B) For a repeat group "Member", in "go to prompt" interface, how to show
more detail using a calculated label?

Member 1: Juan Perez (age: 18)
Member 2: David Lopez (age: 25)

instead of just

Member 1
Member 2

Ramón.

RE: (A)

From the release notes, with ODK Collect 1.3 rev 1025:

if a meta/instanceName field is defined in a form, the non-empty value of
that field will be used as the instanceName when the form is saved (and the
user will be unable to alter it). Otherwise, the pre-1.3 instance naming
treatment will be used. By defining this as a calculated field, the form
designer can control the naming of the submission instances.

RE: (B)

This requires a code change. There is a 'new style repeat' mechanism for
Javarosa, which is usable ONLY if you do not also use jr:count (if you use
jr:count, the Javarosa library forces the current behavior). The new
mechanism is not enabled currently and requires one or two additional
dialogs to be written. If completed, it would allow you to customize the
text displayed on those repeat pop-ups.

Mitch

··· On Tue, Aug 20, 2013 at 9:40 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi

I need two things:

A) I need to put in a calculate question the corresponding XML instance
name of of the current form. Is there a function to get that name?

type

name

calculation

calculate

cInstanceName

‘MySurvey_2013-08-20_10-55-34’

B) For a repeat group "Member", in "go to prompt" interface, how to show
more detail using a calculated label?

Member 1: Juan Perez (age: 18)
Member 2: David Lopez (age: 25)

instead of just

Member 1
Member 2

Ramón.

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

RE: (A)

OK

RE: (B)

Excellent. The repeat group with a personalized message to break.

Mitch

··· 2013/8/20 Mitch Sundt

RE: (A)

From the release notes, with ODK Collect 1.3 rev 1025:

if a meta/instanceName field is defined in a form, the non-empty value of
that field will be used as the instanceName when the form is saved (and the
user will be unable to alter it). Otherwise, the pre-1.3 instance naming
treatment will be used. By defining this as a calculated field, the form
designer can control the naming of the submission instances.

RE: (B)

This requires a code change. There is a 'new style repeat' mechanism for
Javarosa, which is usable ONLY if you do not also use jr:count (if you use
jr:count, the Javarosa library forces the current behavior). The new
mechanism is not enabled currently and requires one or two additional
dialogs to be written. If completed, it would allow you to customize the
text displayed on those repeat pop-ups.

Mitch

On Tue, Aug 20, 2013 at 9:40 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi

I need two things:

A) I need to put in a calculate question the corresponding XML instance
name of of the current form. Is there a function to get that name?

type

name

calculation

calculate

cInstanceName

‘MySurvey_2013-08-20_10-55-34’

B) For a repeat group "Member", in "go to prompt" interface, how to show
more detail using a calculated label?

Member 1: Juan Perez (age: 18)
Member 2: David Lopez (age: 25)

instead of just

Member 1
Member 2

Ramón.

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

From XlsForm, how to define the meta/instanceName field?

··· 2013/8/20 Ramon de la Cruz Lazaro

RE: (A)

OK

RE: (B)

Excellent. The repeat group with a personalized message to break.

Mitch

2013/8/20 Mitch Sundt mitchellsundt@gmail.com

RE: (A)

From the release notes, with ODK Collect 1.3 rev 1025:

if a meta/instanceName field is defined in a form, the non-empty value of
that field will be used as the instanceName when the form is saved (and the
user will be unable to alter it). Otherwise, the pre-1.3 instance naming
treatment will be used. By defining this as a calculated field, the form
designer can control the naming of the submission instances.

RE: (B)

This requires a code change. There is a 'new style repeat' mechanism for
Javarosa, which is usable ONLY if you do not also use jr:count (if you use
jr:count, the Javarosa library forces the current behavior). The new
mechanism is not enabled currently and requires one or two additional
dialogs to be written. If completed, it would allow you to customize the
text displayed on those repeat pop-ups.

Mitch

On Tue, Aug 20, 2013 at 9:40 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi

I need two things:

A) I need to put in a calculate question the corresponding XML instance
name of of the current form. Is there a function to get that name?

type

name

calculation

calculate

cInstanceName

‘MySurvey_2013-08-20_10-55-34’

B) For a repeat group "Member", in "go to prompt" interface, how to
show more detail using a calculated label?

Member 1: Juan Perez (age: 18)
Member 2: David Lopez (age: 25)

instead of just

Member 1
Member 2

Ramón.

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--
Atte
Ramón De la Cruz L.

Ramon,

Here's a relevant topic from the SurveyCTO help, which should apply equally
to the public version of XLSForm:

How do I automatically generate unique names for saved forms?

By default, whenever a new form is filled out, it is named the same thing:
the title of the form. Unless users override this default and enter a
different name when they save each form, the Edit Saved Form, Send
Finalized Form, and Delete Saved Form lists in Collect will show lots of
forms all with the same name; the only way to distinguish them will be to
click on each one to see its contents.

Alternatively, you can automatically name each form in a way that utilizes
the data entered into the form. For example, you might include a unique
household ID and/or a respondent name in the name of the form. To do this,
you need to specify an instance_name setting in your form's settings
worksheet.

Start by adding a new column to your form's settings worksheet, and
entering "instance_name" into the first row of the new column.

Then, in the second row of that new column, add an expression like the
following:

concat('HH SURVEY - ', ${hhid})

Replace "HH SURVEY" with whatever prefix you want to include in form names,
and replace "hhid" with whatever field name contains a unique identifier
for the form. Alternatively, if you want to include multiple fields, you
could enter an expression like this:

concat('HH SURVEY - ID ', ${hhid}, ' - Name ', ${respondent_name})

In this example, both a household ID and a respondent name are included in
the form's name. That way, when you list filled-out forms on a device, you
will be able to more easily find specific instances.

Using variations of the concat() function, you can concatenate together an
arbitrary number of literal strings (enclosed by single-quotes) and an
arbitrary number of form fields (enclosed by ${...}). Note that whatever
you put in the instance_name column should evaluate to a string; so, for
example, "today()" alone won't work to name forms using the current date,
but "string(today())" will work.

Best,

Chris

··· On Wed, Aug 21, 2013 at 10:24 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

From XlsForm, how to define the meta/instanceName field?

2013/8/20 Ramon de la Cruz Lazaro rmdlazaro@gmail.com

RE: (A)

OK

RE: (B)

Excellent. The repeat group with a personalized message to break.

Mitch

2013/8/20 Mitch Sundt mitchellsundt@gmail.com

RE: (A)

From the release notes, with ODK Collect 1.3 rev 1025:

if a meta/instanceName field is defined in a form, the non-empty value
of that field will be used as the instanceName when the form is saved (and
the user will be unable to alter it). Otherwise, the pre-1.3 instance
naming treatment will be used. By defining this as a calculated field, the
form designer can control the naming of the submission instances.

RE: (B)

This requires a code change. There is a 'new style repeat' mechanism for
Javarosa, which is usable ONLY if you do not also use jr:count (if you use
jr:count, the Javarosa library forces the current behavior). The new
mechanism is not enabled currently and requires one or two additional
dialogs to be written. If completed, it would allow you to customize the
text displayed on those repeat pop-ups.

Mitch

On Tue, Aug 20, 2013 at 9:40 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi

I need two things:

A) I need to put in a calculate question the corresponding XML instance
name of of the current form. Is there a function to get that name?

type

name

calculation

calculate

cInstanceName

‘MySurvey_2013-08-20_10-55-34’

B) For a repeat group "Member", in "go to prompt" interface, how to
show more detail using a calculated label?

Member 1: Juan Perez (age: 18)
Member 2: David Lopez (age: 25)

instead of just

Member 1
Member 2

Ramón.

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--
Atte
Ramón De la Cruz L.

--

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.

OK Chris. I tried the "instanceName_ejemplo" XLSForm with the new
instance_name column in settings worksheet, but does not work.

No meta/instanceName field field is generated.

Ramón

instanceName_ejemplo.xls (29 KB)

··· 2013/8/21 Christopher Robert

Ramon,

Here's a relevant topic from the SurveyCTO help, which should apply
equally to the public version of XLSForm:

How do I automatically generate unique names for saved forms?

By default, whenever a new form is filled out, it is named the same thing:
the title of the form. Unless users override this default and enter a
different name when they save each form, the Edit Saved Form, Send
Finalized Form, and Delete Saved Form lists in Collect will show lots of
forms all with the same name; the only way to distinguish them will be to
click on each one to see its contents.

Alternatively, you can automatically name each form in a way that utilizes
the data entered into the form. For example, you might include a unique
household ID and/or a respondent name in the name of the form. To do this,
you need to specify an instance_name setting in your form's settings
worksheet.

Start by adding a new column to your form's settings worksheet, and
entering "instance_name" into the first row of the new column.

Then, in the second row of that new column, add an expression like the
following:

concat('HH SURVEY - ', ${hhid})

Replace "HH SURVEY" with whatever prefix you want to include in form
names, and replace "hhid" with whatever field name contains a unique
identifier for the form. Alternatively, if you want to include multiple
fields, you could enter an expression like this:

concat('HH SURVEY - ID ', ${hhid}, ' - Name ', ${respondent_name})

In this example, both a household ID and a respondent name are included in
the form's name. That way, when you list filled-out forms on a device, you
will be able to more easily find specific instances.

Using variations of the concat() function, you can concatenate together an
arbitrary number of literal strings (enclosed by single-quotes) and an
arbitrary number of form fields (enclosed by ${...}). Note that whatever
you put in the instance_name column should evaluate to a string; so, for
example, "today()" alone won't work to name forms using the current date,
but "string(today())" will work.

Best,

Chris

On Wed, Aug 21, 2013 at 10:24 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

From XlsForm, how to define the meta/instanceName field?

2013/8/20 Ramon de la Cruz Lazaro rmdlazaro@gmail.com

RE: (A)

OK

RE: (B)

Excellent. The repeat group with a personalized message to break.

Mitch

2013/8/20 Mitch Sundt mitchellsundt@gmail.com

RE: (A)

From the release notes, with ODK Collect 1.3 rev 1025:

if a meta/instanceName field is defined in a form, the non-empty value
of that field will be used as the instanceName when the form is saved (and
the user will be unable to alter it). Otherwise, the pre-1.3 instance
naming treatment will be used. By defining this as a calculated field, the
form designer can control the naming of the submission instances.

RE: (B)

This requires a code change. There is a 'new style repeat' mechanism
for Javarosa, which is usable ONLY if you do not also use jr:count (if you
use jr:count, the Javarosa library forces the current behavior). The new
mechanism is not enabled currently and requires one or two additional
dialogs to be written. If completed, it would allow you to customize the
text displayed on those repeat pop-ups.

Mitch

On Tue, Aug 20, 2013 at 9:40 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi

I need two things:

A) I need to put in a calculate question the corresponding XML
instance name of of the current form. Is there a function to get that name?

type

name

calculation

calculate

cInstanceName

‘MySurvey_2013-08-20_10-55-34’

B) For a repeat group "Member", in "go to prompt" interface, how to
show more detail using a calculated label?

Member 1: Juan Perez (age: 18)
Member 2: David Lopez (age: 25)

instead of just

Member 1
Member 2

Ramón.

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--
Atte
Ramón De la Cruz L.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

I suspect the current XLSForm does not support the instance_name setting.

If it does not, you should be able to do:

begin group meta
text instanceName concat(${name},' age ',${age})
end group

··· On Wed, Aug 21, 2013 at 7:56 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

OK Chris. I tried the "instanceName_ejemplo" XLSForm with the new
instance_name column in settings worksheet, but does not work.

No meta/instanceName field field is generated.

Ramón

2013/8/21 Christopher Robert crobert@surveycto.com

Ramon,

Here's a relevant topic from the SurveyCTO help, which should apply
equally to the public version of XLSForm:

How do I automatically generate unique names for saved forms?

By default, whenever a new form is filled out, it is named the same
thing: the title of the form. Unless users override this default and enter
a different name when they save each form, the Edit Saved Form, Send
Finalized Form, and Delete Saved Form lists in Collect will show lots of
forms all with the same name; the only way to distinguish them will be to
click on each one to see its contents.

Alternatively, you can automatically name each form in a way that
utilizes the data entered into the form. For example, you might include a
unique household ID and/or a respondent name in the name of the form. To do
this, you need to specify an instance_name setting in your form's
settings worksheet.

Start by adding a new column to your form's settings worksheet, and
entering "instance_name" into the first row of the new column.

Then, in the second row of that new column, add an expression like the
following:

concat('HH SURVEY - ', ${hhid})

Replace "HH SURVEY" with whatever prefix you want to include in form
names, and replace "hhid" with whatever field name contains a unique
identifier for the form. Alternatively, if you want to include multiple
fields, you could enter an expression like this:

concat('HH SURVEY - ID ', ${hhid}, ' - Name ', ${respondent_name})

In this example, both a household ID and a respondent name are included
in the form's name. That way, when you list filled-out forms on a device,
you will be able to more easily find specific instances.

Using variations of the concat() function, you can concatenate together
an arbitrary number of literal strings (enclosed by single-quotes) and an
arbitrary number of form fields (enclosed by ${...}). Note that whatever
you put in the instance_name column should evaluate to a string; so, for
example, "today()" alone won't work to name forms using the current date,
but "string(today())" will work.

Best,

Chris

On Wed, Aug 21, 2013 at 10:24 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

From XlsForm, how to define the meta/instanceName field?

2013/8/20 Ramon de la Cruz Lazaro rmdlazaro@gmail.com

RE: (A)

OK

RE: (B)

Excellent. The repeat group with a personalized message to break.

Mitch

2013/8/20 Mitch Sundt mitchellsundt@gmail.com

RE: (A)

From the release notes, with ODK Collect 1.3 rev 1025:

if a meta/instanceName field is defined in a form, the non-empty value
of that field will be used as the instanceName when the form is saved (and
the user will be unable to alter it). Otherwise, the pre-1.3 instance
naming treatment will be used. By defining this as a calculated field, the
form designer can control the naming of the submission instances.

RE: (B)

This requires a code change. There is a 'new style repeat' mechanism
for Javarosa, which is usable ONLY if you do not also use jr:count (if you
use jr:count, the Javarosa library forces the current behavior). The new
mechanism is not enabled currently and requires one or two additional
dialogs to be written. If completed, it would allow you to customize the
text displayed on those repeat pop-ups.

Mitch

On Tue, Aug 20, 2013 at 9:40 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi

I need two things:

A) I need to put in a calculate question the corresponding XML
instance name of of the current form. Is there a function to get that name?

type

name

calculation

calculate

cInstanceName

‘MySurvey_2013-08-20_10-55-34’

B) For a repeat group "Member", in "go to prompt" interface, how to
show more detail using a calculated label?

Member 1: Juan Perez (age: 18)
Member 2: David Lopez (age: 25)

instead of just

Member 1
Member 2

Ramón.

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--
Atte
Ramón De la Cruz L.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Ramón,

I uploaded your file to http://opendatakit.org/use/xlsform/ and it output
the attached .xml file. It looks fine to me. Perhaps you're using an older
XLSForm from somewhere else? This support was added not too long ago.

Best,

Chris

instanceName_ejemplo.xml (1.01 KB)

··· On Wed, Aug 21, 2013 at 10:56 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

OK Chris. I tried the "instanceName_ejemplo" XLSForm with the new
instance_name column in settings worksheet, but does not work.

No meta/instanceName field field is generated.

Ramón

2013/8/21 Christopher Robert crobert@surveycto.com

Ramon,

Here's a relevant topic from the SurveyCTO help, which should apply
equally to the public version of XLSForm:

How do I automatically generate unique names for saved forms?

By default, whenever a new form is filled out, it is named the same
thing: the title of the form. Unless users override this default and enter
a different name when they save each form, the Edit Saved Form, Send
Finalized Form, and Delete Saved Form lists in Collect will show lots of
forms all with the same name; the only way to distinguish them will be to
click on each one to see its contents.

Alternatively, you can automatically name each form in a way that
utilizes the data entered into the form. For example, you might include a
unique household ID and/or a respondent name in the name of the form. To do
this, you need to specify an instance_name setting in your form's
settings worksheet.

Start by adding a new column to your form's settings worksheet, and
entering "instance_name" into the first row of the new column.

Then, in the second row of that new column, add an expression like the
following:

concat('HH SURVEY - ', ${hhid})

Replace "HH SURVEY" with whatever prefix you want to include in form
names, and replace "hhid" with whatever field name contains a unique
identifier for the form. Alternatively, if you want to include multiple
fields, you could enter an expression like this:

concat('HH SURVEY - ID ', ${hhid}, ' - Name ', ${respondent_name})

In this example, both a household ID and a respondent name are included
in the form's name. That way, when you list filled-out forms on a device,
you will be able to more easily find specific instances.

Using variations of the concat() function, you can concatenate together
an arbitrary number of literal strings (enclosed by single-quotes) and an
arbitrary number of form fields (enclosed by ${...}). Note that whatever
you put in the instance_name column should evaluate to a string; so, for
example, "today()" alone won't work to name forms using the current date,
but "string(today())" will work.

Best,

Chris

On Wed, Aug 21, 2013 at 10:24 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

From XlsForm, how to define the meta/instanceName field?

2013/8/20 Ramon de la Cruz Lazaro rmdlazaro@gmail.com

RE: (A)

OK

RE: (B)

Excellent. The repeat group with a personalized message to break.

Mitch

2013/8/20 Mitch Sundt mitchellsundt@gmail.com

RE: (A)

From the release notes, with ODK Collect 1.3 rev 1025:

if a meta/instanceName field is defined in a form, the non-empty value
of that field will be used as the instanceName when the form is saved (and
the user will be unable to alter it). Otherwise, the pre-1.3 instance
naming treatment will be used. By defining this as a calculated field, the
form designer can control the naming of the submission instances.

RE: (B)

This requires a code change. There is a 'new style repeat' mechanism
for Javarosa, which is usable ONLY if you do not also use jr:count (if you
use jr:count, the Javarosa library forces the current behavior). The new
mechanism is not enabled currently and requires one or two additional
dialogs to be written. If completed, it would allow you to customize the
text displayed on those repeat pop-ups.

Mitch

On Tue, Aug 20, 2013 at 9:40 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi

I need two things:

A) I need to put in a calculate question the corresponding XML
instance name of of the current form. Is there a function to get that name?

type

name

calculation

calculate

cInstanceName

‘MySurvey_2013-08-20_10-55-34’

B) For a repeat group "Member", in "go to prompt" interface, how to
show more detail using a calculated label?

Member 1: Juan Perez (age: 18)
Member 2: David Lopez (age: 25)

instead of just

Member 1
Member 2

Ramón.

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--
Atte
Ramón De la Cruz L.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--

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.

Hi

Chris, I Downloaded the zip
herehttp://opendatakit.googlecode.com/files/xlsform.zip,
few minutes ago and the meta/instanceName field is not generated (see my
attach)

Mitch, I tried your solution, but XlsForm report: There are two survey
elements named 'meta'

Ramón

instanceName_ejemplo.xml (863 Bytes)

··· 2013/8/21 Christopher Robert

Ramón,

I uploaded your file to http://opendatakit.org/use/xlsform/ and it output
the attached .xml file. It looks fine to me. Perhaps you're using an older
XLSForm from somewhere else? This support was added not too long ago.

Best,

Chris

On Wed, Aug 21, 2013 at 10:56 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

OK Chris. I tried the "instanceName_ejemplo" XLSForm with the new
instance_name column in settings worksheet, but does not work.

No meta/instanceName field field is generated.

Ramón

2013/8/21 Christopher Robert crobert@surveycto.com

Ramon,

Here's a relevant topic from the SurveyCTO help, which should apply
equally to the public version of XLSForm:

How do I automatically generate unique names for saved forms?

By default, whenever a new form is filled out, it is named the same
thing: the title of the form. Unless users override this default and enter
a different name when they save each form, the Edit Saved Form, Send
Finalized Form, and Delete Saved Form lists in Collect will show lots of
forms all with the same name; the only way to distinguish them will be to
click on each one to see its contents.

Alternatively, you can automatically name each form in a way that
utilizes the data entered into the form. For example, you might include a
unique household ID and/or a respondent name in the name of the form. To do
this, you need to specify an instance_name setting in your form's
settings worksheet.

Start by adding a new column to your form's settings worksheet, and
entering "instance_name" into the first row of the new column.

Then, in the second row of that new column, add an expression like the
following:

concat('HH SURVEY - ', ${hhid})

Replace "HH SURVEY" with whatever prefix you want to include in form
names, and replace "hhid" with whatever field name contains a unique
identifier for the form. Alternatively, if you want to include multiple
fields, you could enter an expression like this:

concat('HH SURVEY - ID ', ${hhid}, ' - Name ', ${respondent_name})

In this example, both a household ID and a respondent name are included
in the form's name. That way, when you list filled-out forms on a device,
you will be able to more easily find specific instances.

Using variations of the concat() function, you can concatenate together
an arbitrary number of literal strings (enclosed by single-quotes) and an
arbitrary number of form fields (enclosed by ${...}). Note that whatever
you put in the instance_name column should evaluate to a string; so, for
example, "today()" alone won't work to name forms using the current date,
but "string(today())" will work.

Best,

Chris

On Wed, Aug 21, 2013 at 10:24 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

From XlsForm, how to define the meta/instanceName field?

2013/8/20 Ramon de la Cruz Lazaro rmdlazaro@gmail.com

RE: (A)

OK

RE: (B)

Excellent. The repeat group with a personalized message to break.

Mitch

2013/8/20 Mitch Sundt mitchellsundt@gmail.com

RE: (A)

From the release notes, with ODK Collect 1.3 rev 1025:

if a meta/instanceName field is defined in a form, the non-empty
value of that field will be used as the instanceName when the form is saved
(and the user will be unable to alter it). Otherwise, the pre-1.3 instance
naming treatment will be used. By defining this as a calculated field, the
form designer can control the naming of the submission instances.

RE: (B)

This requires a code change. There is a 'new style repeat' mechanism
for Javarosa, which is usable ONLY if you do not also use jr:count (if you
use jr:count, the Javarosa library forces the current behavior). The new
mechanism is not enabled currently and requires one or two additional
dialogs to be written. If completed, it would allow you to customize the
text displayed on those repeat pop-ups.

Mitch

On Tue, Aug 20, 2013 at 9:40 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi

I need two things:

A) I need to put in a calculate question the corresponding XML
instance name of of the current form. Is there a function to get that name?

type

name

calculation

calculate

cInstanceName

‘MySurvey_2013-08-20_10-55-34’

B) For a repeat group "Member", in "go to prompt" interface, how to
show more detail using a calculated label?

Member 1: Juan Perez (age: 18)
Member 2: David Lopez (age: 25)

instead of just

Member 1
Member 2

Ramón.

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--

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 a topic in
the Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--
Atte
Ramón De la Cruz L.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

Hi Ramón,

Well, you know that http://opendatakit.org/use/xlsform/ works, so you can
use that. As for the downloadable .zip, that must be a slightly older
version. There's the live version (which works), the downloadable version
(which apparently doesn't), the formhub version (which I bet works), and
the SurveyCTO version (which works) -- so there are lots of versions. I
imagine that Mitch and others will try to keep the downloadable version in
sync with the live version, but I'm not sure that they signed up to forever
maintain both. If all else fails, you're free to grab the latest sources
from github and package them yourself.

Best,

Chris

··· On Wed, Aug 21, 2013 at 3:30 PM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi

Chris, I Downloaded the zip herehttp://opendatakit.googlecode.com/files/xlsform.zip,
few minutes ago and the meta/instanceName field is not generated (see my
attach)
https://github.com/UW-ICTD/xlsform.exe/blob/master/README.md

Mitch, I tried your solution, but XlsForm report: There are two survey
elements named 'meta'

Ramón

2013/8/21 Christopher Robert crobert@surveycto.com

Ramón,

I uploaded your file to http://opendatakit.org/use/xlsform/ and it
output the attached .xml file. It looks fine to me. Perhaps you're using an
older XLSForm from somewhere else? This support was added not too long ago.

Best,

Chris

On Wed, Aug 21, 2013 at 10:56 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

OK Chris. I tried the "instanceName_ejemplo" XLSForm with the new
instance_name column in settings worksheet, but does not work.

No meta/instanceName field field is generated.

Ramón

2013/8/21 Christopher Robert crobert@surveycto.com

Ramon,

Here's a relevant topic from the SurveyCTO help, which should apply
equally to the public version of XLSForm:

How do I automatically generate unique names for saved forms?

By default, whenever a new form is filled out, it is named the same
thing: the title of the form. Unless users override this default and enter
a different name when they save each form, the Edit Saved Form, Send
Finalized Form, and Delete Saved Form lists in Collect will show lots of
forms all with the same name; the only way to distinguish them will be to
click on each one to see its contents.

Alternatively, you can automatically name each form in a way that
utilizes the data entered into the form. For example, you might include a
unique household ID and/or a respondent name in the name of the form. To do
this, you need to specify an instance_name setting in your form's
settings worksheet.

Start by adding a new column to your form's settings worksheet, and
entering "instance_name" into the first row of the new column.

Then, in the second row of that new column, add an expression like the
following:

concat('HH SURVEY - ', ${hhid})

Replace "HH SURVEY" with whatever prefix you want to include in form
names, and replace "hhid" with whatever field name contains a unique
identifier for the form. Alternatively, if you want to include multiple
fields, you could enter an expression like this:

concat('HH SURVEY - ID ', ${hhid}, ' - Name ', ${respondent_name})

In this example, both a household ID and a respondent name are included
in the form's name. That way, when you list filled-out forms on a device,
you will be able to more easily find specific instances.

Using variations of the concat() function, you can concatenate together
an arbitrary number of literal strings (enclosed by single-quotes) and an
arbitrary number of form fields (enclosed by ${...}). Note that whatever
you put in the instance_name column should evaluate to a string; so, for
example, "today()" alone won't work to name forms using the current date,
but "string(today())" will work.

Best,

Chris

On Wed, Aug 21, 2013 at 10:24 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

From XlsForm, how to define the meta/instanceName field?

2013/8/20 Ramon de la Cruz Lazaro rmdlazaro@gmail.com

RE: (A)

OK

RE: (B)

Excellent. The repeat group with a personalized message to break.

Mitch

2013/8/20 Mitch Sundt mitchellsundt@gmail.com

RE: (A)

From the release notes, with ODK Collect 1.3 rev 1025:

if a meta/instanceName field is defined in a form, the non-empty
value of that field will be used as the instanceName when the form is saved
(and the user will be unable to alter it). Otherwise, the pre-1.3 instance
naming treatment will be used. By defining this as a calculated field, the
form designer can control the naming of the submission instances.

RE: (B)

This requires a code change. There is a 'new style repeat' mechanism
for Javarosa, which is usable ONLY if you do not also use jr:count (if you
use jr:count, the Javarosa library forces the current behavior). The new
mechanism is not enabled currently and requires one or two additional
dialogs to be written. If completed, it would allow you to customize the
text displayed on those repeat pop-ups.

Mitch

On Tue, Aug 20, 2013 at 9:40 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi

I need two things:

A) I need to put in a calculate question the corresponding XML
instance name of of the current form. Is there a function to get that name?

type

name

calculation

calculate

cInstanceName

‘MySurvey_2013-08-20_10-55-34’

B) For a repeat group "Member", in "go to prompt" interface, how
to show more detail using a calculated label?

Member 1: Juan Perez (age: 18)
Member 2: David Lopez (age: 25)

instead of just

Member 1
Member 2

Ramón.

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--

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 a topic in
the Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--
Atte
Ramón De la Cruz L.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--

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.

OK, the online version is the most updated.

··· 2013/8/21 Christopher Robert

Hi Ramón,

Well, you know that http://opendatakit.org/use/xlsform/ works, so you can
use that. As for the downloadable .zip, that must be a slightly older
version. There's the live version (which works), the downloadable version
(which apparently doesn't), the formhub version (which I bet works), and
the SurveyCTO version (which works) -- so there are lots of versions. I
imagine that Mitch and others will try to keep the downloadable version in
sync with the live version, but I'm not sure that they signed up to forever
maintain both. If all else fails, you're free to grab the latest sources
from github and package them yourself.

Best,

Chris

On Wed, Aug 21, 2013 at 3:30 PM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi

Chris, I Downloaded the zip herehttp://opendatakit.googlecode.com/files/xlsform.zip,
few minutes ago and the meta/instanceName field is not generated (see my
attach)
https://github.com/UW-ICTD/xlsform.exe/blob/master/README.md

Mitch, I tried your solution, but XlsForm report: There are two survey
elements named 'meta'

Ramón

2013/8/21 Christopher Robert crobert@surveycto.com

Ramón,

I uploaded your file to http://opendatakit.org/use/xlsform/ and it
output the attached .xml file. It looks fine to me. Perhaps you're using an
older XLSForm from somewhere else? This support was added not too long ago.

Best,

Chris

On Wed, Aug 21, 2013 at 10:56 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

OK Chris. I tried the "instanceName_ejemplo" XLSForm with the new
instance_name column in settings worksheet, but does not work.

No meta/instanceName field field is generated.

Ramón

2013/8/21 Christopher Robert crobert@surveycto.com

Ramon,

Here's a relevant topic from the SurveyCTO help, which should apply
equally to the public version of XLSForm:

How do I automatically generate unique names for saved forms?

By default, whenever a new form is filled out, it is named the same
thing: the title of the form. Unless users override this default and enter
a different name when they save each form, the Edit Saved Form, Send
Finalized Form, and Delete Saved Form lists in Collect will show lots of
forms all with the same name; the only way to distinguish them will be to
click on each one to see its contents.

Alternatively, you can automatically name each form in a way that
utilizes the data entered into the form. For example, you might include a
unique household ID and/or a respondent name in the name of the form. To do
this, you need to specify an instance_name setting in your form's
settings worksheet.

Start by adding a new column to your form's settings worksheet, and
entering "instance_name" into the first row of the new column.

Then, in the second row of that new column, add an expression like the
following:

concat('HH SURVEY - ', ${hhid})

Replace "HH SURVEY" with whatever prefix you want to include in form
names, and replace "hhid" with whatever field name contains a unique
identifier for the form. Alternatively, if you want to include multiple
fields, you could enter an expression like this:

concat('HH SURVEY - ID ', ${hhid}, ' - Name ', ${respondent_name})

In this example, both a household ID and a respondent name are
included in the form's name. That way, when you list filled-out forms on a
device, you will be able to more easily find specific instances.

Using variations of the concat() function, you can concatenate
together an arbitrary number of literal strings (enclosed by single-quotes)
and an arbitrary number of form fields (enclosed by ${...}). Note that
whatever you put in the instance_name column should evaluate to a string;
so, for example, "today()" alone won't work to name forms using the current
date, but "string(today())" will work.

Best,

Chris

On Wed, Aug 21, 2013 at 10:24 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

From XlsForm, how to define the meta/instanceName field?

2013/8/20 Ramon de la Cruz Lazaro rmdlazaro@gmail.com

RE: (A)

OK

RE: (B)

Excellent. The repeat group with a personalized message to break.

Mitch

2013/8/20 Mitch Sundt mitchellsundt@gmail.com

RE: (A)

From the release notes, with ODK Collect 1.3 rev 1025:

if a meta/instanceName field is defined in a form, the non-empty
value of that field will be used as the instanceName when the form is saved
(and the user will be unable to alter it). Otherwise, the pre-1.3 instance
naming treatment will be used. By defining this as a calculated field, the
form designer can control the naming of the submission instances.

RE: (B)

This requires a code change. There is a 'new style repeat'
mechanism for Javarosa, which is usable ONLY if you do not also use
jr:count (if you use jr:count, the Javarosa library forces the current
behavior). The new mechanism is not enabled currently and requires one or
two additional dialogs to be written. If completed, it would allow you to
customize the text displayed on those repeat pop-ups.

Mitch

On Tue, Aug 20, 2013 at 9:40 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi

I need two things:

A) I need to put in a calculate question the corresponding XML
instance name of of the current form. Is there a function to get that name?

type

name

calculation

calculate

cInstanceName

‘MySurvey_2013-08-20_10-55-34’

B) For a repeat group "Member", in "go to prompt" interface, how
to show more detail using a calculated label?

Member 1: Juan Perez (age: 18)
Member 2: David Lopez (age: 25)

instead of just

Member 1
Member 2

Ramón.

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--

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 a topic in
the Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--
Atte
Ramón De la Cruz L.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

Comparation:

I loaded my Form and i got the following loading times:

A) Windows XLSForm: 5 seconds

B) Online XLSForm: 105 seconds

So, offline version is more convenient for large forms.

Best,

Ramón

··· 2013/8/21 Ramon de la Cruz Lazaro

OK, the online version is the most updated.

2013/8/21 Christopher Robert crobert@surveycto.com

Hi Ramón,

Well, you know that http://opendatakit.org/use/xlsform/ works, so you
can use that. As for the downloadable .zip, that must be a slightly older
version. There's the live version (which works), the downloadable version
(which apparently doesn't), the formhub version (which I bet works), and
the SurveyCTO version (which works) -- so there are lots of versions. I
imagine that Mitch and others will try to keep the downloadable version in
sync with the live version, but I'm not sure that they signed up to forever
maintain both. If all else fails, you're free to grab the latest sources
from github and package them yourself.

Best,

Chris

On Wed, Aug 21, 2013 at 3:30 PM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi

Chris, I Downloaded the zip herehttp://opendatakit.googlecode.com/files/xlsform.zip,
few minutes ago and the meta/instanceName field is not generated (see my
attach)
https://github.com/UW-ICTD/xlsform.exe/blob/master/README.md

Mitch, I tried your solution, but XlsForm report: There are two survey
elements named 'meta'

Ramón

2013/8/21 Christopher Robert crobert@surveycto.com

Ramón,

I uploaded your file to http://opendatakit.org/use/xlsform/ and it
output the attached .xml file. It looks fine to me. Perhaps you're using an
older XLSForm from somewhere else? This support was added not too long ago.

Best,

Chris

On Wed, Aug 21, 2013 at 10:56 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

OK Chris. I tried the "instanceName_ejemplo" XLSForm with the new
instance_name column in settings worksheet, but does not work.

No meta/instanceName field field is generated.

Ramón

2013/8/21 Christopher Robert crobert@surveycto.com

Ramon,

Here's a relevant topic from the SurveyCTO help, which should apply
equally to the public version of XLSForm:

How do I automatically generate unique names for saved forms?

By default, whenever a new form is filled out, it is named the same
thing: the title of the form. Unless users override this default and enter
a different name when they save each form, the Edit Saved Form, Send
Finalized Form, and Delete Saved Form lists in Collect will show lots of
forms all with the same name; the only way to distinguish them will be to
click on each one to see its contents.

Alternatively, you can automatically name each form in a way that
utilizes the data entered into the form. For example, you might include a
unique household ID and/or a respondent name in the name of the form. To do
this, you need to specify an instance_name setting in your form's
settings worksheet.

Start by adding a new column to your form's settings worksheet, and
entering "instance_name" into the first row of the new column.

Then, in the second row of that new column, add an expression like
the following:

concat('HH SURVEY - ', ${hhid})

Replace "HH SURVEY" with whatever prefix you want to include in form
names, and replace "hhid" with whatever field name contains a unique
identifier for the form. Alternatively, if you want to include multiple
fields, you could enter an expression like this:

concat('HH SURVEY - ID ', ${hhid}, ' - Name ', ${respondent_name})

In this example, both a household ID and a respondent name are
included in the form's name. That way, when you list filled-out forms on a
device, you will be able to more easily find specific instances.

Using variations of the concat() function, you can concatenate
together an arbitrary number of literal strings (enclosed by single-quotes)
and an arbitrary number of form fields (enclosed by ${...}). Note that
whatever you put in the instance_name column should evaluate to a string;
so, for example, "today()" alone won't work to name forms using the current
date, but "string(today())" will work.

Best,

Chris

On Wed, Aug 21, 2013 at 10:24 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

From XlsForm, how to define the meta/instanceName field?

2013/8/20 Ramon de la Cruz Lazaro rmdlazaro@gmail.com

RE: (A)

OK

RE: (B)

Excellent. The repeat group with a personalized message to break.

Mitch

2013/8/20 Mitch Sundt mitchellsundt@gmail.com

RE: (A)

From the release notes, with ODK Collect 1.3 rev 1025:

if a meta/instanceName field is defined in a form, the non-empty
value of that field will be used as the instanceName when the form is saved
(and the user will be unable to alter it). Otherwise, the pre-1.3 instance
naming treatment will be used. By defining this as a calculated field, the
form designer can control the naming of the submission instances.

RE: (B)

This requires a code change. There is a 'new style repeat'
mechanism for Javarosa, which is usable ONLY if you do not also use
jr:count (if you use jr:count, the Javarosa library forces the current
behavior). The new mechanism is not enabled currently and requires one or
two additional dialogs to be written. If completed, it would allow you to
customize the text displayed on those repeat pop-ups.

Mitch

On Tue, Aug 20, 2013 at 9:40 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi

I need two things:

A) I need to put in a calculate question the corresponding XML
instance name of of the current form. Is there a function to get that name?

type

name

calculation

calculate

cInstanceName

‘MySurvey_2013-08-20_10-55-34’

B) For a repeat group "Member", in "go to prompt" interface, how
to show more detail using a calculated label?

Member 1: Juan Perez (age: 18)
Member 2: David Lopez (age: 25)

instead of just

Member 1
Member 2

Ramón.

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--

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 a topic in
the Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe
.
To unsubscribe from this group and all its topics, send an email
to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--
Atte
Ramón De la Cruz L.

--

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 a topic in
the Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/OqeyXPZhI78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Atte
Ramón De la Cruz L.

--
Atte
Ramón De la Cruz L.