Auto-fill few questions of every new form, based on previous answers

Hi,

So I have this survey where the field worker is supposed to enter his info in first 8 questions of the form, and then move forward to starting the main survey. I am looking for a way by which they do not have to re-enter the same repeated data again and again, on starting each form. While other options are being considered for a solution, I need to know if it is possible that ODK collect could handle this in something similar to following:

  • Fill the data for first 8 questions
  • Make a QR code of those answers.
  • On starting filling the next form, the QR Code could be scanned and it could pre-fill the first 8 questions
  • And the guy starts onwards from question 9 and so on.

Any solution to this? I know that Collect can create QR Code for the settings of the app. Can it be done for the data as well?

Regards,
Saad

A few months ago we added an option to remember values from the last saved form https://github.com/opendatakit/collect/pull/2882

Unfortunately it's not possible to do that easily in xls form (yet) but you can edit your xml file and add required changes manually.
Here is a sample form:
testForm.xml (1.3 KB)

You need to add:
<instance id="last-saved" src="jr://instance/last-saved"/> (in my file it's line 24)

and a special line for each question you want to be remembered like I did in line 27:
<setvalue event="odk-instance-first-load" ref="/data/text1" value="instance('last-saved')/data/text1" type="string"/>

1 Like

The last-saved feature sounds like it would suit your needs. It is now available in XLSForm. Please see the documentation.