Hi
i want to be able to edit my already sent submissions,
earlyer threads hat similar questions:
···
- https://groups.google.com/forum/#!searchin/opendatakit/edit$20submissions/opendatakit/hp9TsOMurCU/b5U2a3JGnewJ - https://groups.google.com/forum/#!searchin/opendatakit/update$20submissions/opendatakit/goqD6ECAN8g/gI_tJIHND4sJis there already a recent solution described, i did not find?
As ODK-experts already wrote that ODK does not provide such edit-funktion,
i designed the following solution:
The basic idea is to use an export.csv of the form as pull-basis for later
edits. This means that u have to export all submissions to .csv first.
Then the form must be uploaded again (with new version-number and this
.csv-(media)file or just overwrite the existing form). In this new form
version, the existing data entries can now be seen and changed / modified.
It is a very complicated and not really satisfying way but in the end it
should be working with easy forms. I think its not working with attached
media!
Basic required knowledge to understand this idea is what is described in
XLSForm.org here http://xlsform.org/#pre-loading-csv-data:
The biggest challenge is to prepare the form in a way that it already
contains all rows / columns which are necessary to pull data later.
Theese are the basic steps:
- design your form mentioning the conditions below
- upload form to ODK-aggregate and ODK-collect and use it to collect data.
Upload all finished data to aggregate. - export data from ODK-aggregate as results.csv
now you can use this results as basis for further collection and changing
existing entries:
4. change version number of yourform.xml and upload it again to
ODK-aggregate, but now togehter with the results.csv. Load the new form
also in ODK-collect.
5. delete the old form-version in ODK-collect and ODK-aggregate (if you
don't want to get confused by same naming)
- fill out new forms , change existing data
- after uploading finished forms, export submissions in ODK-aggregate as
results.csv file again - now merge both results.csv-files to the new (complete) results.csv
- start again with step 4. by uploading the new results.csv containing all
earlyer submissions
With this method, only new or changed data will be visible as submissions
in aggregate. So if you have to have all data visible in aggregate, this
method will not be appropriate.
*Form design: (*to design in EXCEL)
basic rows
- input of an exact ID, like an "adress_ID": street and number (in one
field or in two fields and later connected via a calculation) - calculation of "adress_ID_key" calculation: ${adress_ID}
- end (as date and time of data collection) -> for eventually merge later
now the data rows: for every input i repeat the following four rows
- calculate, "data_pull", *caluculation: *pulldata('results', 'data',
'adress_ID_key', ${adress_ID}) - select_one yes_no, "data_y_n", label: "Change the existing value:
${data_pull}?"* relevant:* string-length(${data_pull}) > 0 - question_typeX, label: "Please insert data." hint: "Leave free to
keep ${data_pull}",* relevant: *${data_yn} = 'yes' or
string-length(${data_pull}) = 0 - calculate, "data", calculation: if(string-length(${data_in}) > 0,
${data_in}, ${data_pull})
Merging results.csv
will be edited later
I would be happy to get some feedback what you think about this method to
re-edit existing submissions. Are there much easyer possibilities?
If necessary, i can add a screenshot or table of my draft of the
form-design to my post.