Record the date/time at the data collection

Hi,
Can someone tell me how to use function now() or today() in Build or Xfrom,
in order to record the date/time at the data collection?
Thanks,
Wen

1st: there are properties that you can use to set the start (first begun)
and end times (marked-as-finalized) of a form.

See https://opendatakit.org/help/form-design/examples/#preload_params

and on http://xlsform.org/ search for "Metadata" in XLSForms, these are
added to the settings page.

not sure how to use these within Build.

2nd: if you need to record a date and not allow it to be revised later when
you edit or swipe-through a form (or any calculation that you don't want to
be updated after its first time), you can wrap it in the once() function.
If your calculate expression is:

once(now())

then only if the field is empty will once() execute the calculation that it
wraps and store the resulting value in the field.

ยทยทยท On Tue, Apr 26, 2016 at 8:51 AM, Wen wrote:

Hi,
Can someone tell me how to use function now() or today() in Build or
Xfrom, in order to record the date/time at the data collection?
Thanks,
Wen

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com