NOTE:* the form definition is expected to define* a meta/instanceID field
-- See https://bitbucket.org/javarosa/javarosa/wiki/OpenRosaMetaDataSchema
The OpenRosa schema REQUIRES that a form specify this field. The best way
to define this, with the current tools, is
<bind nodeset="/data/meta/instanceID"
calculate="once(concat("uuid:",uuid()))" readonly="true()" type="string"/>
But for backward compatibility, the XLSForm generater omits the once()
wrapper ( the once() function was only recently added to JR ).
When the software submitting a filled-in form supplies the appropriate
headers and requests an XML response, ODK Aggregate will return the "Server
Response Format" described here:
https://bitbucket.org/javarosa/javarosa/wiki/FormSubmissionAPI
And within that response XML, ODK Aggregate adds an
<submissionMetadata...> element. e.g.,
<OpenRosaResponse xmlns="http://openrosa.org/http/response">
<message>Form Received! You've submitted 5 forms today</message>
That <submissionMetadata...> element reports information back to the
client that is ignored by ODK Collect, but is processed by ODK Briefcase.
The net effect is, if your form does not conform to the OpenRosa
specification (and lacks a meta/instanceID field), then ODK Briefcase will
parse this element and remember the instanceID that ODK Aggregate assigned
to it. This enables ODK Briefcase and ODK Aggregate to coordinate their
actions and prevents the creation of duplicates during their interactions.
But, again, this is for support of legacy / non-conformant forms.
On Fri, Sep 19, 2014 at 9:03 AM, Yaw Anokwa yanokwa@nafundi.com wrote:
Dagmar,
If the form requires an instanceID, then it's generated on the mobile
device and that ID is used in the server. If it doesn't require an
instanceID, then it is generated by ODK Aggregate when that submission
is posted. I don't think it goes back down to ODK Collect (or ODK
Briefcase), but I haven't looked at that code in a while...
Yaw
Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.
On Fri, Sep 19, 2014 at 8:41 AM, Dagmar Timler diggitydugs@gmail.com wrote:
Hi
Thanks for the quick reply Yaw.
I am busy working on the ODK Collect - oXd bridge and looking into the
issue
of duplicates. Can I assume that the instanceID is generated by
Aggregate
and then passed back to ODK? I'll have another look at the ODK collect
code
on Monday and then see where the instanceID is referenced.
Thanks again
Dagmar
On Fri, Sep 19, 2014 at 5:02 PM, Yaw Anokwa yanokwa@nafundi.com wrote:
Dagmar,
If the form has an instanceID, Aggregate de-dupes on that.
Yaw
Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.
On Fri, Sep 19, 2014 at 7:31 AM, Dagmar diggitydugs@gmail.com wrote:
Hi
I recently found that you can view sent forms via the "Send Finalized
Forms"
screen if you change the view to "View sent and unsent forms". This
screen
allows you to select a form that has already been submitted and send
it
again to the server. When it arrives on the server, it comes in
exactly
the
same format as the original submit (as far as I can see).
My question is: how does the Aggregate server ensure that no
duplicate
data
is created?
Thanks
Dagmar
--
You received this message because you are subscribed to the Google
Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it,
send
an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the
Google Groups "ODK Developers" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit-developers/f4y9jm4QE4Y/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send
an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com
--
You received this message because you are subscribed to a topic in the
Google Groups "ODK Developers" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit-developers/f4y9jm4QE4Y/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.