Using the date a previous form was completed from the automatic date and time stamp?

Hi,

I am wondering whether it is possible to load the date that a previous form
(one month postnatal) was completed into the form that is currently being
done (six month postnatal)? I have been using the automatic date stamp so
I don't specifically have a question in the one month postnatal form where
the date is inputted and therefore have not been saving it as a case
property. But in the six month postnatal form I want to set a validation
on a question such that the date entered as the answer for that question
cannot be before the date of the first postnatal interview. I have created
the hidden value to contain the date that the previous form was done but
have now realised that I don't know where to get that information from!

Thanks

Jenny

Hi Jenny,

To do this, you'll have to save the date you want as a case property. In
one month postnatal, create a hidden value that contains the date the form
was completed. You can save this hidden value to the case and load it into
the six month postnatal form just like any other case property.

To set the hidden value to today's date, you can simply write "today()" in
the calculate of that hidden value. The "today()" function gets the date
from the phone at the time the form is completed.

For more information about "today()", see
https://help.commcarehq.org/display/commcarepublic/CommCare+Functions#CommCareFunctions-today

For more information about calculations, see:
https://help.commcarehq.org/display/commcarepublic/Common+Logic+and+Calculations#CommonLogicandCalculations-Calculations

Thanks,
Amelia

··· On Thu, Oct 17, 2013 at 8:33 AM, Jennifer Hall wrote:

Hi,

I am wondering whether it is possible to load the date that a previous
form (one month postnatal) was completed into the form that is currently
being done (six month postnatal)? I have been using the automatic date
stamp so I don't specifically have a question in the one month postnatal
form where the date is inputted and therefore have not been saving it as a
case property. But in the six month postnatal form I want to set a
validation on a question such that the date entered as the answer for that
question cannot be before the date of the first postnatal interview. I
have created the hidden value to contain the date that the previous form
was done but have now realised that I don't know where to get that
information from!

Thanks

Jenny

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

Jenny - For your existing data, I think you would have to extract the dates
from the data, and using the technique described at
https://confluence.dimagi.com/display/commcarepublic/Excel+Importer+Instructions, update
your cases with the previous interview date.

··· On Thursday, October 17, 2013 2:01:05 PM UTC, Amelia Sagoff wrote: > > Hi Jenny, > > To do this, you'll have to save the date you want as a case property. In > one month postnatal, create a hidden value that contains the date the form > was completed. You can save this hidden value to the case and load it into > the six month postnatal form just like any other case property. > > To set the hidden value to today's date, you can simply write "today()" in > the calculate of that hidden value. The "today()" function gets the date > from the phone at the time the form is completed. > > For more information about "today()", see > https://help.commcarehq.org/display/commcarepublic/CommCare+Functions#CommCareFunctions-today > > For more information about calculations, see: > https://help.commcarehq.org/display/commcarepublic/Common+Logic+and+Calculations#CommonLogicandCalculations-Calculations > > Thanks, > Amelia > > > > On Thu, Oct 17, 2013 at 8:33 AM, Jennifer Hall <jenny_...@yahoo.co.uk wrote: > >> Hi, >> >> I am wondering whether it is possible to load the date that a previous >> form (one month postnatal) was completed into the form that is currently >> being done (six month postnatal)? I have been using the automatic date >> stamp so I don't specifically have a question in the one month postnatal >> form where the date is inputted and therefore have not been saving it as a >> case property. But in the six month postnatal form I want to set a >> validation on a question such that the date entered as the answer for that >> question cannot be before the date of the first postnatal interview. I >> have created the hidden value to contain the date that the previous form >> was done but have now realised that I don't know where to get that >> information from! >> >> Thanks >> >> Jenny >> >> -- >> You received this message because you are subscribed to the Google Groups >> "commcare-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-user...@googlegroups.com . >> For more options, visit https://groups.google.com/groups/opt_out. >> > >