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.