Update Survey Form on ODK Aggregate and Collect without losing data

Dear ODK Developer,

Currently, I'm looking to find the way to update the ODK form in ODK
Aggregate and ODK Collect without add more form to ODK Aggregate. I mean,
It just update the old form and keep all data in the server. I don't want
to have new form in server or ODK collect.

Would you mind to give some idea for me?

Regards.

If you are adding fields to your survey or changing the data type of a
field (e.g., from string to number, from select-one to select-many), you
cannot just 'update the form' -- the structure of the collected data has
changed. You must use a new form_id. The software detects that there was a
change and rejects the attempted change. This is because the database
tables have been created for the original form, and it would require
changing those data tables to support the new form, and, it is unclear
whether this is your intention or an accident or error on your part.

Also, if you have changed one field so dramatically, this often means that
during data analysis, you need to interpret the answers to your survey
differently, so we keep them separately.

When you change forms like this, we want it to be very clear that you need
to explicitly merge the data sets in whatever way is makes sense for your
data.

If you do need to combine two or more forms into a single data set, one way
to do this is to publish the forms into Fusion Tables then create a VIEW in
fusion tables that combines the data from the two forms into one
consolidated data set.

··· ------------- If, however, you have a form, and you are just adding alternate translations, correcting typos, updating images, or rewording questions, you can update that form by adding a version attribute to the XML by specifying a value in the version column on the settings sheet in the XLS file.

The version value is recommended to be of this format:

yyyyMMddVV

i.e.,

2014042801

where VV is a version number 01-99.

ODK Aggregate will compare version strings and only allow you to update a
form if the update has a version string that is lexically greater than the
previous version (the version string is a string, not a number).

On Mon, Apr 28, 2014 at 3:10 AM, Bunhann Thou bunhann@gmail.com wrote:

Dear ODK Developer,

Currently, I'm looking to find the way to update the ODK form in ODK
Aggregate and ODK Collect without add more form to ODK Aggregate. I mean,
It just update the old form and keep all data in the server. I don't want
to have new form in server or ODK collect.

Would you mind to give some idea for me?

Regards.

--
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

If you are adding fields to your survey or changing the data type of a field (e.g., from string to number, from select-one to select-many), you cannot just 'update the form' -- the structure of the collected data has changed. You must use a new form_id. The software detects that there was a change and rejects the attempted change. This is because the database tables have been created for the original form, and it would require changing those data tables to support the new form, and, it is unclear whether this is your intention or an accident or error on your part.

Also, if you have changed one field so dramatically, this often means that during data analysis, you need to interpret the answers to your survey differently, so we keep them separately.

When you change forms like this, we want it to be very clear that you need to explicitly merge the data sets in whatever way is makes sense for your data.

If you do need to combine two or more forms into a single data set, one way to do this is to publish the forms into Fusion Tables then create a VIEW in fusion tables that combines the data from the two forms into one consolidated data set.


If, however, you have a form, and you are just adding alternate translations, correcting typos, updating images, or rewording questions, you can update that form by adding a version attribute to the XML by specifying a value in the version column on the settings sheet in the XLS file.

The version value is recommended to be of this format:

yyyyMMddVV

i.e.,

2014042801

where VV is a version number 01-99.

ODK Aggregate will compare version strings and only allow you to update a form if the update has a version string that is lexically greater than the previous version (the version string is a string, not a number).

Dear ODK Developer,

Currently, I'm looking to find the way to update the ODK form in ODK Aggregate and ODK Collect without add more form to ODK Aggregate. I mean, It just update the old form and keep all data in the server. I don't want to have new form in server or ODK collect.

Would you mind to give some idea for me?

Regards.

--

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
mitche...@gmail.com

Mitch,

When a form's version is incremented in Aggregate as you describe, is there some way for Collect to automatically detect that the form has been updated?

For example, when the Collect user next lists the forms available on the server it would identify those forms which it has previously downloaded but which are now superseded as they have been updated on the server.

Thanks,

Leon

··· On Tuesday, 29 April 2014 01:28:04 UTC+8, Mitch wrote: > On Mon, Apr 28, 2014 at 3:10 AM, Bunhann Thou wrote:

Leon,

Collect has all the relevant data to detect that a form has changed,
but there is no code in Collect to act on that. Perhaps you can
contribute that code?

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Thu, Jul 30, 2015 at 2:16 AM, leon.wende@gmail.com wrote:

On Tuesday, 29 April 2014 01:28:04 UTC+8, Mitch wrote:

If you are adding fields to your survey or changing the data type of a field (e.g., from string to number, from select-one to select-many), you cannot just 'update the form' -- the structure of the collected data has changed. You must use a new form_id. The software detects that there was a change and rejects the attempted change. This is because the database tables have been created for the original form, and it would require changing those data tables to support the new form, and, it is unclear whether this is your intention or an accident or error on your part.

Also, if you have changed one field so dramatically, this often means that during data analysis, you need to interpret the answers to your survey differently, so we keep them separately.

When you change forms like this, we want it to be very clear that you need to explicitly merge the data sets in whatever way is makes sense for your data.

If you do need to combine two or more forms into a single data set, one way to do this is to publish the forms into Fusion Tables then create a VIEW in fusion tables that combines the data from the two forms into one consolidated data set.


If, however, you have a form, and you are just adding alternate translations, correcting typos, updating images, or rewording questions, you can update that form by adding a version attribute to the XML by specifying a value in the version column on the settings sheet in the XLS file.

The version value is recommended to be of this format:

yyyyMMddVV

i.e.,

2014042801

where VV is a version number 01-99.

ODK Aggregate will compare version strings and only allow you to update a form if the update has a version string that is lexically greater than the previous version (the version string is a string, not a number).

On Mon, Apr 28, 2014 at 3:10 AM, Bunhann Thou bun...@gmail.com wrote:

Dear ODK Developer,

Currently, I'm looking to find the way to update the ODK form in ODK Aggregate and ODK Collect without add more form to ODK Aggregate. I mean, It just update the old form and keep all data in the server. I don't want to have new form in server or ODK collect.

Would you mind to give some idea for me?

Regards.

--

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
mitche...@gmail.com

Mitch,

When a form's version is incremented in Aggregate as you describe, is there some way for Collect to automatically detect that the form has been updated?

For example, when the Collect user next lists the forms available on the server it would identify those forms which it has previously downloaded but which are now superseded as they have been updated on the server.

Thanks,

Leon

--
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.

Leon,

Collect has all the relevant data to detect that a form has changed,
but there is no code in Collect to act on that. Perhaps you can
contribute that code?

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

If you are adding fields to your survey or changing the data type of a field (e.g., from string to number, from select-one to select-many), you cannot just 'update the form' -- the structure of the collected data has changed. You must use a new form_id. The software detects that there was a change and rejects the attempted change. This is because the database tables have been created for the original form, and it would require changing those data tables to support the new form, and, it is unclear whether this is your intention or an accident or error on your part.

Also, if you have changed one field so dramatically, this often means that during data analysis, you need to interpret the answers to your survey differently, so we keep them separately.

When you change forms like this, we want it to be very clear that you need to explicitly merge the data sets in whatever way is makes sense for your data.

If you do need to combine two or more forms into a single data set, one way to do this is to publish the forms into Fusion Tables then create a VIEW in fusion tables that combines the data from the two forms into one consolidated data set.


If, however, you have a form, and you are just adding alternate translations, correcting typos, updating images, or rewording questions, you can update that form by adding a version attribute to the XML by specifying a value in the version column on the settings sheet in the XLS file.

The version value is recommended to be of this format:

yyyyMMddVV

i.e.,

2014042801

where VV is a version number 01-99.

ODK Aggregate will compare version strings and only allow you to update a form if the update has a version string that is lexically greater than the previous version (the version string is a string, not a number).

Dear ODK Developer,

Currently, I'm looking to find the way to update the ODK form in ODK Aggregate and ODK Collect without add more form to ODK Aggregate. I mean, It just update the old form and keep all data in the server. I don't want to have new form in server or ODK collect.

Would you mind to give some idea for me?

Regards.

--

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
mitche...@gmail.com

Mitch,

When a form's version is incremented in Aggregate as you describe, is there some way for Collect to automatically detect that the form has been updated?

For example, when the Collect user next lists the forms available on the server it would identify those forms which it has previously downloaded but which are now superseded as they have been updated on the server.

Thanks,

Leon

--
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.

Thanks Yaw,

It is highly likely that I will implement this. If so, I will contribute the code.

Leon

··· On Thursday, 30 July 2015 19:43:24 UTC+8, Yaw Anokwa wrote: > On Thu, Jul 30, 2015 at 2:16 AM, wrote: > > On Tuesday, 29 April 2014 01:28:04 UTC+8, Mitch wrote: > >> On Mon, Apr 28, 2014 at 3:10 AM, Bunhann Thou wrote:

Leon,

Collect has all the relevant data to detect that a form has changed,
but there is no code in Collect to act on that. Perhaps you can
contribute that code?

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

If you are adding fields to your survey or changing the data type of a field (e.g., from string to number, from select-one to select-many), you cannot just 'update the form' -- the structure of the collected data has changed. You must use a new form_id. The software detects that there was a change and rejects the attempted change. This is because the database tables have been created for the original form, and it would require changing those data tables to support the new form, and, it is unclear whether this is your intention or an accident or error on your part.

Also, if you have changed one field so dramatically, this often means that during data analysis, you need to interpret the answers to your survey differently, so we keep them separately.

When you change forms like this, we want it to be very clear that you need to explicitly merge the data sets in whatever way is makes sense for your data.

If you do need to combine two or more forms into a single data set, one way to do this is to publish the forms into Fusion Tables then create a VIEW in fusion tables that combines the data from the two forms into one consolidated data set.


If, however, you have a form, and you are just adding alternate translations, correcting typos, updating images, or rewording questions, you can update that form by adding a version attribute to the XML by specifying a value in the version column on the settings sheet in the XLS file.

The version value is recommended to be of this format:

yyyyMMddVV

i.e.,

2014042801

where VV is a version number 01-99.

ODK Aggregate will compare version strings and only allow you to update a form if the update has a version string that is lexically greater than the previous version (the version string is a string, not a number).

Dear ODK Developer,

Currently, I'm looking to find the way to update the ODK form in ODK Aggregate and ODK Collect without add more form to ODK Aggregate. I mean, It just update the old form and keep all data in the server. I don't want to have new form in server or ODK collect.

Would you mind to give some idea for me?

Regards.

--

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
mitche...@gmail.com

Mitch,

When a form's version is incremented in Aggregate as you describe, is there some way for Collect to automatically detect that the form has been updated?

For example, when the Collect user next lists the forms available on the server it would identify those forms which it has previously downloaded but which are now superseded as they have been updated on the server.

Thanks,

Leon

--
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.

Thanks Yaw,

It is highly likely that I will implement this. If so, I will contribute the code.

Leon

Hi Yaw,

I am not familiar with the usual process for contributing changes to the repository. Therefore, I have included a straightforward description of the changes I made in the attached file in the hope that you or someone else can apply them for me.

Thanks,

Leon Wende

Changes to effect detection of superseded forms.txt (2.74 KB)

··· On Friday, 31 July 2015 09:11:03 UTC+8, leon....@gmail.com wrote: > On Thursday, 30 July 2015 19:43:24 UTC+8, Yaw Anokwa wrote: > > On Thu, Jul 30, 2015 at 2:16 AM, wrote: > > > On Tuesday, 29 April 2014 01:28:04 UTC+8, Mitch wrote: > > >> On Mon, Apr 28, 2014 at 3:10 AM, Bunhann Thou wrote:

Leon,

Thanks for writing this code! If you'd like it to appear in trunk,
please use a pull request.
https://github.com/opendatakit/collect/pulls.

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Fri, Jul 31, 2015 at 2:24 AM, leon.wende@gmail.com wrote:

On Friday, 31 July 2015 09:11:03 UTC+8, leon....@gmail.com wrote:

On Thursday, 30 July 2015 19:43:24 UTC+8, Yaw Anokwa wrote:

Leon,

Collect has all the relevant data to detect that a form has changed,
but there is no code in Collect to act on that. Perhaps you can
contribute that code?

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Thu, Jul 30, 2015 at 2:16 AM, leon.wende@gmail.com wrote:

On Tuesday, 29 April 2014 01:28:04 UTC+8, Mitch wrote:

If you are adding fields to your survey or changing the data type of a field (e.g., from string to number, from select-one to select-many), you cannot just 'update the form' -- the structure of the collected data has changed. You must use a new form_id. The software detects that there was a change and rejects the attempted change. This is because the database tables have been created for the original form, and it would require changing those data tables to support the new form, and, it is unclear whether this is your intention or an accident or error on your part.

Also, if you have changed one field so dramatically, this often means that during data analysis, you need to interpret the answers to your survey differently, so we keep them separately.

When you change forms like this, we want it to be very clear that you need to explicitly merge the data sets in whatever way is makes sense for your data.

If you do need to combine two or more forms into a single data set, one way to do this is to publish the forms into Fusion Tables then create a VIEW in fusion tables that combines the data from the two forms into one consolidated data set.


If, however, you have a form, and you are just adding alternate translations, correcting typos, updating images, or rewording questions, you can update that form by adding a version attribute to the XML by specifying a value in the version column on the settings sheet in the XLS file.

The version value is recommended to be of this format:

yyyyMMddVV

i.e.,

2014042801

where VV is a version number 01-99.

ODK Aggregate will compare version strings and only allow you to update a form if the update has a version string that is lexically greater than the previous version (the version string is a string, not a number).

On Mon, Apr 28, 2014 at 3:10 AM, Bunhann Thou bun...@gmail.com wrote:

Dear ODK Developer,

Currently, I'm looking to find the way to update the ODK form in ODK Aggregate and ODK Collect without add more form to ODK Aggregate. I mean, It just update the old form and keep all data in the server. I don't want to have new form in server or ODK collect.

Would you mind to give some idea for me?

Regards.

--

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
mitche...@gmail.com

Mitch,

When a form's version is incremented in Aggregate as you describe, is there some way for Collect to automatically detect that the form has been updated?

For example, when the Collect user next lists the forms available on the server it would identify those forms which it has previously downloaded but which are now superseded as they have been updated on the server.

Thanks,

Leon

--
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.

Thanks Yaw,

It is highly likely that I will implement this. If so, I will contribute the code.

Leon

Hi Yaw,

I am not familiar with the usual process for contributing changes to the repository. Therefore, I have included a straightforward description of the changes I made in the attached file in the hope that you or someone else can apply them for me.

Thanks,

Leon Wende

Hi Mitch, can you please elaborate on this point:

If you do need to combine two or more forms into a single data set, one way to do this is to publish the forms into Fusion Tables then create a VIEW in fusion tables that combines the data from the two forms into one consolidated data set.

I'm trying to create a VIEW that unions data from two forms (the only difference between them is the addition of one new question). From what I can tell, this operation is not supported within FusionTables:

The best approach I can think of is to Publish to Google Spreadsheets instead and manually copy/paste rows. Am I missing something?

Also, can you help me understand why you recommend against merely incrementing the version number when adding a new question? It doesn't seem like this would break existing saved data.

Thanks!
Max

My mistake; Fusion Tables does not support UNION when creating a view
https://developers.google.com/fusiontables/docs/v2/sql-reference#createView

and it apparently doesn't support importing from one fusion table into
another.

So the only solution I can think of is to do as you suggest --

publish to Google Sheets or use ODK Briefcase to generate CSV files
(if you have repeat groups, you probably want to use ODK Briefcase).

then import data from those into Fusion Tables.

··· On Fri, May 13, 2016 at 8:46 AM, wrote:

Hi Mitch, can you please elaborate on this point:

If you do need to combine two or more forms into a single data set, one
way to do this is to publish the forms into Fusion Tables then create a
VIEW in fusion tables that combines the data from the two forms into one
consolidated data set.

I'm trying to create a VIEW that unions data from two forms (the only
difference between them is the addition of one new question). From what I
can tell, this operation is not supported within FusionTables:

http://stackoverflow.com/questions/6930032/is-there-way-to-union-two-google-fusion-tables-into-one-view-or-insert-rows-fro

The best approach I can think of is to Publish to Google Spreadsheets
instead and manually copy/paste rows. Am I missing something?

Also, can you help me understand why you recommend against merely
incrementing the version number when adding a new question? It doesn't
seem like this would break existing saved data.

Thanks!
Max

--
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