[ODK Community] Re: Generating a Unique ID for a Form Submission

Hey Guys, I looked at it again this morning, still no ID's showing,

However, when I browsed the csv through Stata, the ID popped up, pretty neatly, Dunno what the previous issue was, bt its all working fine and working not.

Thanks.
Regards
Ezra

··· Sent from my Nokia phone -----Original Message----- From: Rwakazooba Ezra Aliija Sent: 05/14/2013, 17:06 To: opendatakit@googlegroups.com Subject: Re: [ODK Community] Re: Generating a Unique ID for a Form Submission

Yaw, I thought I could attach a clip of what my sheet looks like, all the
calculate rows come right after a repeat group(hidden for size purposes).

From the exported data however,
It only seems to work for "HHMemberSurveyID" the other csv do not have the
id replicate

any ideas would be appreciated.

apologies in case of any trouble viewing the image

Thanks.
regards.
Ezra
[image: Inline image 1]

On Tue, May 14, 2013 at 4:55 PM, Rwakazooba Ezra Aliija < rwakazooba@gmail.com> wrote:

Yaw, Just to confirm by instance/data name, I gather you mean the "name"
column in the xls file, am I right?

On Tue, May 14, 2013 at 4:39 PM, Rwakazooba Ezra Aliija < rwakazooba@gmail.com> wrote:

Thanks Yaw, I going a head to try it out.
Will let you know how it goes.

Regards
Ezra

On Tue, May 14, 2013 at 4:30 PM, Yaw Anokwa yanokwa@nafundi.com wrote:

Ezra,

You insert the id as often as you'd like. The only catch is that the
instance/data name has to be unique.

Yaw

Need ODK help? Go to http://nafundi.com for custom features, form
design, implementation support, and user training for ODK.

On Tue, May 14, 2013 at 6:29 AM, Rwakazooba Ezra Aliija rwakazooba@gmail.com wrote:

Hello Victoria, thanks for sharing this.

I am glad I came across this post. One quick question however, it
there a
limit as to how many time one could have the calculate field carry
forward
the ID as you illustrated, say if one has multiple separate repeat
groups
within the same form?

Any help will be highly appreciated.

Thanks.
Ezra

On Monday, January 28, 2013 3:31:54 PM UTC+3, Victoria Trinies wrote:

Hi Sam,

I had the same issue, and Yaw helped me out. You can insert the ID
through

calculation, where the calculation = the name of the unique ID
question. If

you're creating forms as xls and converting to xlm (the only way I
know how

to do it) then you'd:

make sure you have a column called 'calculation'
after your begin repeat, enter a line with type: calculate
read_only: yes
calculation: ${name of ID variable}

Works like a charm.

-Victoria

On Monday, 28 January 2013 11:58:10 UTC, Sam wrote:

Hi Mitch (or anyone else with an answer),

Is there a way to link each form submitted with a personalized
unique ID?

For example, we are surveying multiple households with multiple
"repeat

groups." Each household is assigned a unique 7-digit ID at the
outset of the

survey-- this is entered as an answer to a survey question. This ID
is the

same for all members of the household. When we export mutiple
completed

surveys to csv files using ODK Briefcase, the only way to tie each
"row"

across multiple CSVs to a given household is to compare the KEY or
PARENT_KEY column in each CSV file.

Is there a way we could instead or in addition have the 7-digit
unique ID

be the unique identifier that ties all rows or all individual
answers of a

given survey together?

Thanks,
Sam

On Friday, March 30, 2012 5:54:16 PM UTC, Mitch wrote:

That's a different issue.

If you have a form with a repeat group, you can use ODK Briefcase to
download the submissions to your local machine then use ODK
Briefcase

(rather than ODK Aggregate) to Export to CSV that form data. This
will

produce a CSV for the overall form, and a CSV for each repeat group
in the

form definition. There are columns on the far right of the rows in
these

files that enable you to pair up the data across these tables.

Mitch

On Fri, Mar 30, 2012 at 3:53 AM, Humphreys Kabota humphrey...@investinknowledge.org wrote:

Mitchell,
I guess I have a similar problem, but specifically with the
repeating

groups (rosters): Is there a way that the looped data should be
joined to the parent data rather than having them coming as
separate

with the generated parent keys? If this is not possible, then, how
well could I merge the two different data instances (parent and
roster

tables); I am using stata 11.

Humphreys.

On Mar 29, 11:00 am, Mitch S mitchellsu...@gmail.com wrote:

If the transmission to the server will be greater than 10MB, it
is

split
across multiple submissions. This is to bound the size of the
Virtual
Machine running on the server.

To avoid this problem , specify an instanceID in the form, as
defined

here:
https://bitbucket.org/javarosa/javarosa/wiki/OpenRosaMetaDataSchema For

ODK Aggregate, you don't need to specify the namespace, just
have a

group in your form.

With ODK Collect 1.1.7 and later, the bind for this element that
replicates
the instanceID that would otherwise be generated by Aggregate
would

be:

<bind nodeset="/data/meta/instanceID" type="string"
readonly="true()"

calculate="concat('uuid:', uuid())"/>

You can construct your own instanceID expressions. However, you
should
avoid symbols and punctuation other than colons and dashes since
the

parsing logic within Aggregate is likely fragile if you go wild
with

punctuation (and that is used later on when retrieving images,
repeat

groups, etc.). If you do construct your own values, they must be
less than
255 characters long and must be unique across all devices and
submissions.

Mitch

On Thu, Mar 29, 2012 at 10:33 AM, Feltpad Incorporated <feltpad...@gmail.com wrote:

We are running into a problem where if we send in a submission
that

has several photos, the submission is getting broken up into
several
entries in the form's _CORE table (_IS_COMPLETE = 0).

I do not understand why ODK does this. The issue is that when
this

happens, there is no way to group together the _CORE rows to
know

which data was submitted with the same form instance.

The best option we have come up with is to try and match the
data

fields in the _CORE table, but this will not guarantee that we
are

putting the correct pieces of data together - if one user
submits

multiple form instances that contain identical data in the
_CORE

table
(and different data in the other tables), then how do we know
where

the separation is?

My thought was to create a unique ID that would be a field in
the

_CORE table and would be generated each time the user creates
a new

instance of the form. The unique ID could be the username
+current_timestamp, or anything else that would be unique.

Any ideas / comment would be greatly appreciated.

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

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

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

--
Mitch Sundt
Software Engineer
University of Washington
mitche...@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 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/93v4lCzf4YI/unsubscribe?hl=en
.
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.