A column As primary key

Hi,
for a given ODK xml form, is it possible to make a column behave as primary
key (uniquely identify each row of any record of this form)?
if so, how it goes?
Thanks, in advance.

This is the purpose of the instanceID metadata column.

··· On Tue, Jun 7, 2016 at 4:17 PM, Amal Dahounto wrote:

Hi,
for a given ODK xml form, is it possible to make a column behave as
primary key (uniquely identify each row of any record of this form)?
if so, how it goes?
Thanks, in advance.

--

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/d/optout.

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

Thanks, Mitch
I know for instanceID metadata column;
but I would like to make another column uniquely identify records rows
(that); my intention is to prevent duplicates for this column.
Regards

··· 2016-06-08 2:44 GMT+02:00 Mitch Sundt :

This is the purpose of the instanceID metadata column.

https://opendatakit.org/help/form-design/

On Tue, Jun 7, 2016 at 4:17 PM, Amal Dahounto altessedac@gmail.com wrote:

Hi,
for a given ODK xml form, is it possible to make a column behave as
primary key (uniquely identify each row of any record of this form)?
if so, how it goes?
Thanks, in advance.

--

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/d/optout.

--
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 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/d/optout.

--

Amal DAHOUNTO GLELE C.
Statisticien, Data Manager
Institut de Recherche pour le Développement (IRD)
MIVEGEC (UMR IRD 224 - CNRS 5290 - Université de Montpellier)
IRD-CREC (Cotonou, BENIN)
IRD-IRSS (Bobo, BURKINA FASO)
Tél:(+229) 97 33 83 44 ; (+226) 60 96 23 74

Amal,

instanceID is as unique of a key as you can get, but you can use
calculates to build another key from answers in the form.

Yaw

··· -- Need ODK consultants? Nafundi provides form design, server setup, in-field training, and software development for ODK. Go to https://nafundi.com to get started.

On Wed, Jun 8, 2016 at 1:41 PM, Amal Dahounto amal.dahounto@gmail.com wrote:

Thanks, Mitch
I know for instanceID metadata column;
but I would like to make another column uniquely identify records rows
(that); my intention is to prevent duplicates for this column.
Regards

2016-06-08 2:44 GMT+02:00 Mitch Sundt mitchellsundt@gmail.com:

This is the purpose of the instanceID metadata column.

https://opendatakit.org/help/form-design/

On Tue, Jun 7, 2016 at 4:17 PM, Amal Dahounto altessedac@gmail.com wrote:

Hi,
for a given ODK xml form, is it possible to make a column behave as
primary key (uniquely identify each row of any record of this form)?
if so, how it goes?
Thanks, in advance.

--

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/d/optout.

--
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 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/d/optout.

--

Amal DAHOUNTO GLELE C.
Statisticien, Data Manager
Institut de Recherche pour le Développement (IRD)
MIVEGEC (UMR IRD 224 - CNRS 5290 - Université de Montpellier)
IRD-CREC (Cotonou, BENIN)
IRD-IRSS (Bobo, BURKINA FASO)
Tél:(+229) 97 33 83 44 ; (+226) 60 96 23 74

--

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/d/optout.

ok, thanks.

··· 2016-06-08 13:46 GMT+02:00 Yaw Anokwa :

Amal,

instanceID is as unique of a key as you can get, but you can use
calculates to build another key from answers in the form.

Yaw

Need ODK consultants? Nafundi provides form design, server setup,
in-field training, and software development for ODK. Go to
https://nafundi.com to get started.

On Wed, Jun 8, 2016 at 1:41 PM, Amal Dahounto amal.dahounto@gmail.com wrote:

Thanks, Mitch
I know for instanceID metadata column;
but I would like to make another column uniquely identify records rows
(that); my intention is to prevent duplicates for this column.
Regards

2016-06-08 2:44 GMT+02:00 Mitch Sundt mitchellsundt@gmail.com:

This is the purpose of the instanceID metadata column.

https://opendatakit.org/help/form-design/

On Tue, Jun 7, 2016 at 4:17 PM, Amal Dahounto altessedac@gmail.com wrote:

Hi,
for a given ODK xml form, is it possible to make a column behave as
primary key (uniquely identify each row of any record of this form)?
if so, how it goes?
Thanks, in advance.

--

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/d/optout.

--
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 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/d/optout.

--

Amal DAHOUNTO GLELE C.
Statisticien, Data Manager
Institut de Recherche pour le Développement (IRD)
MIVEGEC (UMR IRD 224 - CNRS 5290 - Université de Montpellier)
IRD-CREC (Cotonou, BENIN)
IRD-IRSS (Bobo, BURKINA FASO)
Tél:(+229) 97 33 83 44 ; (+226) 60 96 23 74

--

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/d/optout.

--

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/d/optout.

--

Amal DAHOUNTO GLELE C.
Statisticien, Data Manager
Institut de Recherche pour le Développement (IRD)
MIVEGEC (UMR IRD 224 - CNRS 5290 - Université de Montpellier)
IRD-CREC (Cotonou, BENIN)
IRD-IRSS (Bobo, BURKINA FASO)
Tél:(+229) 97 33 83 44 ; (+226) 60 96 23 74

I have a column named household_code, at the following format: three
capital letters three integer (e.g : ABC125); i would like to deny
duplicate for it in that form records
I tried to build it as key by using calculate and substract operators, but
it does not work yet;
your help, please.
Regards,

··· 2016-06-08 13:46 GMT+02:00 Yaw Anokwa :

Amal,

instanceID is as unique of a key as you can get, but you can use
calculates to build another key from answers in the form.

Yaw

Need ODK consultants? Nafundi provides form design, server setup,
in-field training, and software development for ODK. Go to
https://nafundi.com to get started.

On Wed, Jun 8, 2016 at 1:41 PM, Amal Dahounto amal.dahounto@gmail.com wrote:

Thanks, Mitch
I know for instanceID metadata column;
but I would like to make another column uniquely identify records rows
(that); my intention is to prevent duplicates for this column.
Regards

2016-06-08 2:44 GMT+02:00 Mitch Sundt mitchellsundt@gmail.com:

This is the purpose of the instanceID metadata column.

https://opendatakit.org/help/form-design/

On Tue, Jun 7, 2016 at 4:17 PM, Amal Dahounto altessedac@gmail.com wrote:

Hi,
for a given ODK xml form, is it possible to make a column behave as
primary key (uniquely identify each row of any record of this form)?
if so, how it goes?
Thanks, in advance.

--

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/d/optout.

--
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 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/d/optout.

--

Amal DAHOUNTO GLELE C.
Statisticien, Data Manager
Institut de Recherche pour le Développement (IRD)
MIVEGEC (UMR IRD 224 - CNRS 5290 - Université de Montpellier)
IRD-CREC (Cotonou, BENIN)
IRD-IRSS (Bobo, BURKINA FASO)
Tél:(+229) 97 33 83 44 ; (+226) 60 96 23 74

--

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/d/optout.

--

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/d/optout.

--

Amal DAHOUNTO GLELE C.
Statisticien, Data Manager
Institut de Recherche pour le Développement (IRD)
MIVEGEC (UMR IRD 224 - CNRS 5290 - Université de Montpellier)
IRD-CREC (Cotonou, BENIN)
IRD-IRSS (Bobo, BURKINA FASO)
Tél:(+229) 97 33 83 44 ; (+226) 60 96 23 74

ODK Collect does not have the capability to communicate with all other ODK
Collect devices and ensure that a household_code (or other value) is unique
across all devices.

And it does not have the capability to ensure that a given
household_code (or other value) is never re-used in a subsequent form.

It can only ensure, through constraint formulas, that a field does not have
a specific value or set of values.

If you need either of the other capabilities, those would require an
external application or some other 3rd party solution.

Ensuring that each user-entered answer in a repeat group is unique is
difficult. It is easy to generate always-unique values in a calculated
field although these will not be very user-friendly or readable; e.g.,
once(uuid())

It may be better to re-think what you are trying to do.

Does this value need to be user-generated?

Can you use the *position(${repeat_group_name}) *in your calculation to
generate a portion of the unique value (1, 2,.. ).

··· On Wed, Jun 8, 2016 at 10:56 AM, Amal Dahounto wrote:

I have a column named household_code, at the following format: three
capital letters three integer (e.g : ABC125); i would like to deny
duplicate for it in that form records
I tried to build it as key by using calculate and substract operators, but
it does not work yet;
your help, please.
Regards,

2016-06-08 13:46 GMT+02:00 Yaw Anokwa yanokwa@nafundi.com:

Amal,

instanceID is as unique of a key as you can get, but you can use
calculates to build another key from answers in the form.

Yaw

Need ODK consultants? Nafundi provides form design, server setup,
in-field training, and software development for ODK. Go to
https://nafundi.com to get started.

On Wed, Jun 8, 2016 at 1:41 PM, Amal Dahounto amal.dahounto@gmail.com wrote:

Thanks, Mitch
I know for instanceID metadata column;
but I would like to make another column uniquely identify records rows
(that); my intention is to prevent duplicates for this column.
Regards

2016-06-08 2:44 GMT+02:00 Mitch Sundt mitchellsundt@gmail.com:

This is the purpose of the instanceID metadata column.

https://opendatakit.org/help/form-design/

On Tue, Jun 7, 2016 at 4:17 PM, Amal Dahounto altessedac@gmail.com wrote:

Hi,
for a given ODK xml form, is it possible to make a column behave as
primary key (uniquely identify each row of any record of this form)?
if so, how it goes?
Thanks, in advance.

--

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/d/optout.

--
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 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/d/optout.

--

Amal DAHOUNTO GLELE C.
Statisticien, Data Manager
Institut de Recherche pour le Développement (IRD)
MIVEGEC (UMR IRD 224 - CNRS 5290 - Université de Montpellier)
IRD-CREC (Cotonou, BENIN)
IRD-IRSS (Bobo, BURKINA FASO)
Tél:(+229) 97 33 83 44 ; (+226) 60 96 23 74

--

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/d/optout.

--

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/d/optout.

--

Amal DAHOUNTO GLELE C.
Statisticien, Data Manager
Institut de Recherche pour le Développement (IRD)
MIVEGEC (UMR IRD 224 - CNRS 5290 - Université de Montpellier)
IRD-CREC (Cotonou, BENIN)
IRD-IRSS (Bobo, BURKINA FASO)
Tél:(+229) 97 33 83 44 ; (+226) 60 96 23 74

--

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/d/optout.

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

Thank you very much, Mitch.
Considering your precious precisions and suggestions,
i 'll will re-think my aim on the question.
Regards,

··· 2016-06-08 20:42 GMT+02:00 Mitch Sundt :

ODK Collect does not have the capability to communicate with all other ODK
Collect devices and ensure that a household_code (or other value) is unique
across all devices.

And it does not have the capability to ensure that a given
household_code (or other value) is never re-used in a subsequent form.

It can only ensure, through constraint formulas, that a field does not
have a specific value or set of values.

If you need either of the other capabilities, those would require an
external application or some other 3rd party solution.

Ensuring that each user-entered answer in a repeat group is unique is
difficult. It is easy to generate always-unique values in a calculated
field although these will not be very user-friendly or readable; e.g.,
once(uuid())

It may be better to re-think what you are trying to do.

Does this value need to be user-generated?

Can you use the *position(${repeat_group_name}) *in your calculation to
generate a portion of the unique value (1, 2,.. ).

On Wed, Jun 8, 2016 at 10:56 AM, Amal Dahounto amal.dahounto@gmail.com wrote:

I have a column named household_code, at the following format: three
capital letters three integer (e.g : ABC125); i would like to deny
duplicate for it in that form records
I tried to build it as key by using calculate and substract operators,
but it does not work yet;
your help, please.
Regards,

2016-06-08 13:46 GMT+02:00 Yaw Anokwa yanokwa@nafundi.com:

Amal,

instanceID is as unique of a key as you can get, but you can use
calculates to build another key from answers in the form.

Yaw

Need ODK consultants? Nafundi provides form design, server setup,
in-field training, and software development for ODK. Go to
https://nafundi.com to get started.

On Wed, Jun 8, 2016 at 1:41 PM, Amal Dahounto amal.dahounto@gmail.com wrote:

Thanks, Mitch
I know for instanceID metadata column;
but I would like to make another column uniquely identify records rows
(that); my intention is to prevent duplicates for this column.
Regards

2016-06-08 2:44 GMT+02:00 Mitch Sundt mitchellsundt@gmail.com:

This is the purpose of the instanceID metadata column.

https://opendatakit.org/help/form-design/

On Tue, Jun 7, 2016 at 4:17 PM, Amal Dahounto altessedac@gmail.com wrote:

Hi,
for a given ODK xml form, is it possible to make a column behave as
primary key (uniquely identify each row of any record of this form)?
if so, how it goes?
Thanks, in advance.

--

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/d/optout.

--
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 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/d/optout.

--

Amal DAHOUNTO GLELE C.
Statisticien, Data Manager
Institut de Recherche pour le Développement (IRD)
MIVEGEC (UMR IRD 224 - CNRS 5290 - Université de Montpellier)
IRD-CREC (Cotonou, BENIN)
IRD-IRSS (Bobo, BURKINA FASO)
Tél:(+229) 97 33 83 44 ; (+226) 60 96 23 74

--

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/d/optout.

--

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/d/optout.

--

Amal DAHOUNTO GLELE C.
Statisticien, Data Manager
Institut de Recherche pour le Développement (IRD)
MIVEGEC (UMR IRD 224 - CNRS 5290 - Université de Montpellier)
IRD-CREC (Cotonou, BENIN)
IRD-IRSS (Bobo, BURKINA FASO)
Tél:(+229) 97 33 83 44 ; (+226) 60 96 23 74

--

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/d/optout.

--
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 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/d/optout.

--

Amal DAHOUNTO GLELE C.
Statisticien, Data Manager
Institut de Recherche pour le Développement (IRD)
MIVEGEC (UMR IRD 224 - CNRS 5290 - Université de Montpellier)
IRD-CREC (Cotonou, BENIN)
IRD-IRSS (Bobo, BURKINA FASO)
Tél:(+229) 97 33 83 44 ; (+226) 60 96 23 74