Hi ODK community,
How can I retrieve the timing (start and end dates/times) of a draft submission in ODK? Is there a specific field or setting that captures this information?
Challenge
I am getting the start and end time including the draft period which is not allowing me detect the real time taken to fill the form.
Thank you.
Hello @Amit_Kumar
As you've mentioned above, in ODK, the start and end times of a form submission are captured using the start and end metadata fields. However, these fields include all the time from when the form was first opened until it was submitted, which can include draft periods where the form was saved and later resumed.
The challenge with this is that:
If you are using the time from when the form was initially opened (including drafts), it could result in inaccurate calculations of the actual time spent filling the form, as it includes periods of inactivity when the form was not actively being filled out.
Possible Solutions:
- Use of Audit Logging: You can enable audit logging in ODK forms to capture more detailed time-stamp information, including when the form was saved, resumed, and submitted. This way, you can differentiate between active form-filling time and periods when the form was left idle or saved as a draft.
To enable audit logging, you can check out the documentation through the links below:
- Manual Tracking of Active Time: If you don’t want to use audit logs, you could create custom fields to record specific time stamps when the form is actively being filled. For example:
Add a question "What time did you start?" at the beginning of the form to capture when the user starts filling it (start_time).
Add a question "What time did you finish?" at the end to capture when the user finishes (end_time).
Use a calculation field "int((end_time - start_time))" to subtract these times to get a more accurate duration.
Either of these approaches should help you capture more accurate timing data, removing periods when the form was inactive.
I hope this is helpful. If you need further clarification, feel free to ask any questions!
Best regards.