Hi @yanokwa, and thanks for your detailed answer!
About now()
My previous tests were with ODK Collect v1.18.2, but on a rather old smartphone running Android 4.2.2. To make sure my problems with now() were not related to that, I've just tested the following form on a more recent phone running Android 7.0 and ODK Collect v1.17.2 (October 2018): test once and now functions.xls (23.5 KB). However, I still get a value for now() that corresponds to the (last) opening of the form.
Here is an example list of values that I get for the calculated functions used in this form:
-
start: 15:27:07.411 -
end: 15:29:08.191 -
once(now()): 15:27:07.436. As expected, this is shortly afterstart. -
now(): 15:27:07.439. This is the unexpected result: it's basically equal tostartinstead ofend. -
if(${age}='','',once(now())): 15:27:55.967. As expected, this is the timestamp of when the value of${age}was set. (To be exact, it is the timestamp of the last time that the value of${age}went from empty to non-empty: if you set it, then empty it, then set it again, the latter will determine the timestamp. But still, that's expected.) -
if(${age}='','',now()): 15:29:08.188. This is shortly beforeend, which means it gets re-evaluated when saving/finalising the survey. Is it expected? I don't know anymore, but this is the trick that I use as a final timestamp to compute the duration of the survey, as mentioned at the end of my first message.
Am I missing something here? Is there something wrong in my XLSForm?
About timestamping in general
I will probably test the audit log feature at some point, but I doubt that we'll have the time/staff resources to analyse such data in the long run. That's why I'm aiming for a simple, relatively easy-to-monitor "survey duration" indicator that may become a standard part of our assessments. We may also try and add additional timestamps with the if(${variable}='','',once(now())) method that you mention.
Misc.
Thanks for the pull request concerning the documentation. If I find anything else worth mentioning, I'll sure look into how to do that myself!
About the differences between Enketo and ODK/KoBo Collect, I imagined it would be something like that, but thanks for the clarification. We usually use ODK Collect on the phones and KoBoToolbox as the platform to manage our assessments.