Metadata collection in ODK2

Hi there,

I am currently trying out ODK2 to test its capabilities compared to ODK and other similar data collection tools.
While going trough the documentation of ODK2 I noticed that metadata collection, which is done in ODK by adding special question types in the XLSForm-file, is not mentioned.
Regardless, I tried to add those question types to an ODK2 application (in case it was simply neglected in the documentation), but the .xlsx file gets rejected by the XLSX Converter due to unknown question types.
So my question is: Is metadata collection simply not a feature of ODK2 (yet?)? Or is it possible to build the necessary prompt types as custom prompts, using HTML/JS?

Thanks a lot,
Markus

Hi Markus,

What metadata fields are you interested in from ODK Collect? ODK 2 has metadata fields provided with each row. The fields with a brief description are below.

_id - an id for the row
_form_id - the id of the Survey form used to generate the row
_locale - the locale used to create the row
_savepoint_type - a value for whether the information in the row has been finalized
_savepoint_timestamp - a timestamp indicating when the row was saved last
_savepoint_creator - the user who saved the row
_row_etag - an id that identifies a particular revision of a row within a table.
_default_access - related to data permissions, specifies the access to the row that is granted to all unprivileged user
_owner - related to data permissions, the owner of this row
_group_read_only - related to data permissions, specify a user group that is granted read access on the row
_group_modify - related to data permissions, specify a user group that is granted modify access on the row
_group_privileged - related to data permissions, specify a user group that is granted privileged access on the row

Do any of these fields sound like what you would need? If not, you can always create a custom prompt type.

Clarice

1 Like

Hi Clarice,

so these are collected automatically, without having to state it explicitly in the XLSForm-File?
That’s fantastic!
The one’s that I’m missing (coming from ODK1 and similar projects) are the collection-device related fields like Device-ID (IMEI), Subscriber-ID (IMSI) or SIM serial.
I don’t need them in a specific project, it just seems odd to me that the respective question-types from ODK1 are not support in ODK2 anymore.
If they can be recreated using custom prompts, though, I’m perfectly fine with that. :slightly_smiling_face:

Markus

Hi Markus,

Yes, these fields are collected automatically. I’m glad that they will be useful, but feel free to experiment with the tools to make sure that the fields meet your needs. For most cases, we have typically thought that the problem of knowing which device was responsible for making changes to a row would be solved by using user permissions. We feel that this approach is inline with Android best practices (https://developer.android.com/training/articles/user-data-ids, https://android-developers.googleblog.com/2011/03/identifying-app-installations.html). However, if this is a feature that you would like, feel free to create a feature request. We are open to adding features that the community finds useful.

Clarice

Thank you very much for this explanation!
This reasoning definitely makes sense and should indeed cover most cases.

Markus