Placing timestamps throughout survey

I added some timestamps to my survey in the form builder. Each timestamp is
a hidden value with calculate condition=double(now()). I spaced them out
throughout the survey. But when I actually run the survey (or look at the
survey summary) all of those timestamps I added end up clustered all
together at the very end of the survey, and set with the same time. I
expected them to get set with the time at which the surveyor gets to the
hidden value question. Can someone help clarify why it works this way? And
ideally, give me some advice on how to have the timestamps be set at the
points where I inserted them into the survey. The point is to be able to
know at what time the surveyor finished question 10, 15, 20, etc in the
survey.

Thanks,

Ilya

Hi Ilya,

Unfortunately the CommCareHQ Form builder hasn’t been built to expose this
functionality particularly robustly. Our form logic is “declarative”,
meaning that it is updated internally to “always be consistent” with your
values, even if a question changes. The downside of this is that it’s
difficult to track “Events” which occur in a straightforward way.

It is possible to create a type of timestamp using somewhat awkward pattern
involving a repeat which creates one element (which is not visible to the
user) when the user completes a question and navigates “past” the repeat in
the form, setting the value of that to the current time.

I’ve attached a form which demonstrates the behavior, you can upload it to
a new form in your project space to see it

It is somewhat complex, and they way you would use it would be to insert
one of the “timestamp” groups from the form into your project directly
after
the question you want to timestamp (or that question’s Question
List), and change the “trigger” condition be true when the question is
“answered”.

The timestamps will only update the first time a user answers the
question and navigates “over” the timestamper.

-Clayton

Example of Question Timestamping.xml (7.53 KB)

··· On Thu, Apr 6, 2017 at 10:23 AM, wrote:

I added some timestamps to my survey in the form builder. Each timestamp
is a hidden value with calculate condition=double(now()). I spaced them out
throughout the survey. But when I actually run the survey (or look at the
survey summary) all of those timestamps I added end up clustered all
together at the very end of the survey, and set with the same time. I
expected them to get set with the time at which the surveyor gets to the
hidden value question. Can someone help clarify why it works this way? And
ideally, give me some advice on how to have the timestamps be set at the
points where I inserted them into the survey. The point is to be able to
know at what time the surveyor finished question 10, 15, 20, etc in the
survey.

Thanks,

Ilya


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/d/optout.

In layman’s terms is it true to say that hidden values are refreshed after
each question irrespective of where they are placed in the form builder?

Simon

··· On Thu, Apr 6, 2017 at 6:59 PM, Clayton Sims wrote:

Hi Ilya,

Unfortunately the CommCareHQ Form builder hasn’t been built to expose this
functionality particularly robustly. Our form logic is “declarative”,
meaning that it is updated internally to “always be consistent” with your
values, even if a question changes. The downside of this is that it’s
difficult to track “Events” which occur in a straightforward way.

It is possible to create a type of timestamp using somewhat awkward
pattern involving a repeat which creates one element (which is not visible
to the user) when the user completes a question and navigates “past” the
repeat in the form, setting the value of that to the current time.

I’ve attached a form which demonstrates the behavior, you can upload it to
a new form in your project space to see it

It is somewhat complex, and they way you would use it would be to insert
one of the “timestamp” groups from the form into your project directly
after
the question you want to timestamp (or that question’s Question
List), and change the “trigger” condition be true when the question is
"answered".

The timestamps will only update the first time a user answers the
question and navigates “over” the timestamper.

-Clayton

On Thu, Apr 6, 2017 at 10:23 AM, ilya@enveritas.org wrote:

I added some timestamps to my survey in the form builder. Each timestamp
is a hidden value with calculate condition=double(now()). I spaced them out
throughout the survey. But when I actually run the survey (or look at the
survey summary) all of those timestamps I added end up clustered all
together at the very end of the survey, and set with the same time. I
expected them to get set with the time at which the surveyor gets to the
hidden value question. Can someone help clarify why it works this way? And
ideally, give me some advice on how to have the timestamps be set at the
points where I inserted them into the survey. The point is to be able to
know at what time the surveyor finished question 10, 15, 20, etc in the
survey.

Thanks,

Ilya


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/d/optout.


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/d/optout.


Please excuse any syntax errors. This email was sent from my phone.
07932 107109.

Hi Simon,

Thanks for the “translation” :p, sorry for the overly detailed answer.

The logic behind when each hidden value is refreshed is unfortunately a bit
hard to articulate, but it can definitely be as often as after each
question was answered. That’s a good assumption to make.

For safety and “correctness” the form will also often re-evaluate all
"Calculate" and “display” condition values (but not ‘default’ values)
immediately before it saves the form as complete.

-Clayton

··· On Thu, Apr 6, 2017 at 2:11 PM, Simon Berry wrote:

In layman’s terms is it true to say that hidden values are refreshed after
each question irrespective of where they are placed in the form builder?

Simon

On Thu, Apr 6, 2017 at 6:59 PM, Clayton Sims csims@dimagi.com wrote:

Hi Ilya,

Unfortunately the CommCareHQ Form builder hasn’t been built to expose
this functionality particularly robustly. Our form logic is “declarative”,
meaning that it is updated internally to “always be consistent” with your
values, even if a question changes. The downside of this is that it’s
difficult to track “Events” which occur in a straightforward way.

It is possible to create a type of timestamp using somewhat awkward
pattern involving a repeat which creates one element (which is not visible
to the user) when the user completes a question and navigates “past” the
repeat in the form, setting the value of that to the current time.

I’ve attached a form which demonstrates the behavior, you can upload it
to a new form in your project space to see it

It is somewhat complex, and they way you would use it would be to insert
one of the “timestamp” groups from the form into your project directly
after
the question you want to timestamp (or that question’s Question
List), and change the “trigger” condition be true when the question is
"answered".

The timestamps will only update the first time a user answers the
question and navigates “over” the timestamper.

-Clayton

On Thu, Apr 6, 2017 at 10:23 AM, ilya@enveritas.org wrote:

I added some timestamps to my survey in the form builder. Each timestamp
is a hidden value with calculate condition=double(now()). I spaced them out
throughout the survey. But when I actually run the survey (or look at the
survey summary) all of those timestamps I added end up clustered all
together at the very end of the survey, and set with the same time. I
expected them to get set with the time at which the surveyor gets to the
hidden value question. Can someone help clarify why it works this way? And
ideally, give me some advice on how to have the timestamps be set at the
points where I inserted them into the survey. The point is to be able to
know at what time the surveyor finished question 10, 15, 20, etc in the
survey.

Thanks,

Ilya


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/d/optout.


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/d/optout.


Please excuse any syntax errors. This email was sent from my phone.
07932 107109.


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/d/optout.

Thanks Clayton for the info and Simon for help clarifying.

I’ll try the workaround for now. For the longer term it would be great if
Commcare could add the option to have some timestamp info on questions.
It’s useful for a variety of applications, e.g. for looking in detail at
data quality.

Thanks again,
ilya

··· On Thursday, April 6, 2017 at 2:31:30 PM UTC-4, Clayton Sims wrote: > > Hi Simon, > > Thanks for the "translation" :p, sorry for the overly detailed answer. > > The logic behind when each hidden value is refreshed is unfortunately a > bit hard to articulate, but it can definitely be as often as after each > question was answered. That's a good assumption to make. > > For safety and "correctness" the form will also often re-evaluate all > "Calculate" and "display" condition values (but not 'default' values) > immediately before it saves the form as complete. > > -Clayton > > On Thu, Apr 6, 2017 at 2:11 PM, Simon Berry <si...@colalife.org > wrote: > >> In layman's terms is it true to say that hidden values are refreshed >> after each question irrespective of where they are placed in the form >> builder? >> >> Simon >> >> >> On Thu, Apr 6, 2017 at 6:59 PM, Clayton Sims <cs...@dimagi.com > wrote: >> >>> Hi Ilya, >>> >>> Unfortunately the CommCareHQ Form builder hasn't been built to expose >>> this functionality particularly robustly. Our form logic is "declarative", >>> meaning that it is updated internally to "always be consistent" with your >>> values, even if a question changes. The downside of this is that it's >>> difficult to track "Events" which occur in a straightforward way. >>> >>> It is possible to create a type of timestamp using somewhat awkward >>> pattern involving a repeat which creates one element (which is not visible >>> to the user) when the user completes a question and navigates "past" the >>> repeat in the form, setting the value of that to the current time. >>> >>> I've attached a form which demonstrates the behavior, you can upload it >>> to a new form in your project space to see it >>> >>> It is somewhat complex, and they way you would use it would be to insert >>> one of the "timestamp" groups from the form into your project *directly >>> after* the question you want to timestamp (or that question's Question >>> List), and change the "trigger" condition be true when the question is >>> "answered". >>> >>> The timestamps will only update the *first* time a user answers the >>> question *and* navigates "over" the timestamper. >>> >>> -Clayton >>> >>> On Thu, Apr 6, 2017 at 10:23 AM, <il...@enveritas.org > wrote: >>> >>>> I added some timestamps to my survey in the form builder. Each >>>> timestamp is a hidden value with calculate condition=double(now()). I >>>> spaced them out throughout the survey. But when I actually run the survey >>>> (or look at the survey summary) all of those timestamps I added end up >>>> clustered all together at the very end of the survey, and set with the same >>>> time. I expected them to get set with the time at which the surveyor gets >>>> to the hidden value question. Can someone help clarify why it works this >>>> way? And ideally, give me some advice on how to have the timestamps be set >>>> at the points where I inserted them into the survey. The point is to be >>>> able to know at what time the surveyor finished question 10, 15, 20, etc in >>>> the survey. >>>> >>>> >>>> Thanks, >>>> >>>> Ilya >>>> >>>> -- >>>> 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/d/optout. >>>> >>> >>> -- >>> 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/d/optout. >>> >> -- >> Please excuse any syntax errors. This email was sent from my phone. >> 07932 107109. >> >> -- >> 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/d/optout. >> > >

Hi Ilya!

Sorry that it’s an awkward process :/. We definitely think that
per-question time-stamping is something that would be a value-add for
CommCare (especially for some of our users running research projects) and
we have been building out portions of it bit-by-bit but haven’t managed to
close the gap into a cohesive “feature” just yet due to limited resources
on our team.

We very hope to change that, though. Keep an eye out in the future for a
product announcement of adding timestamps!

-Clayton

··· On Fri, Apr 7, 2017 at 10:11 AM, wrote:

Thanks Clayton for the info and Simon for help clarifying.

I’ll try the workaround for now. For the longer term it would be great if
Commcare could add the option to have some timestamp info on questions.
It’s useful for a variety of applications, e.g. for looking in detail at
data quality.

Thanks again,
ilya

On Thursday, April 6, 2017 at 2:31:30 PM UTC-4, Clayton Sims wrote:

Hi Simon,

Thanks for the “translation” :p, sorry for the overly detailed answer.

The logic behind when each hidden value is refreshed is unfortunately a
bit hard to articulate, but it can definitely be as often as after each
question was answered. That’s a good assumption to make.

For safety and “correctness” the form will also often re-evaluate all
"Calculate" and “display” condition values (but not ‘default’ values)
immediately before it saves the form as complete.

-Clayton

On Thu, Apr 6, 2017 at 2:11 PM, Simon Berry si...@colalife.org wrote:

In layman’s terms is it true to say that hidden values are refreshed
after each question irrespective of where they are placed in the form
builder?

Simon

On Thu, Apr 6, 2017 at 6:59 PM, Clayton Sims cs...@dimagi.com wrote:

Hi Ilya,

Unfortunately the CommCareHQ Form builder hasn’t been built to expose
this functionality particularly robustly. Our form logic is “declarative”,
meaning that it is updated internally to “always be consistent” with your
values, even if a question changes. The downside of this is that it’s
difficult to track “Events” which occur in a straightforward way.

It is possible to create a type of timestamp using somewhat awkward
pattern involving a repeat which creates one element (which is not visible
to the user) when the user completes a question and navigates “past” the
repeat in the form, setting the value of that to the current time.

I’ve attached a form which demonstrates the behavior, you can upload it
to a new form in your project space to see it

It is somewhat complex, and they way you would use it would be to
insert one of the “timestamp” groups from the form into your project directly
after
the question you want to timestamp (or that question’s Question
List), and change the “trigger” condition be true when the question is
"answered".

The timestamps will only update the first time a user answers the
question and navigates “over” the timestamper.

-Clayton

On Thu, Apr 6, 2017 at 10:23 AM, il...@enveritas.org wrote:

I added some timestamps to my survey in the form builder. Each
timestamp is a hidden value with calculate condition=double(now()). I
spaced them out throughout the survey. But when I actually run the survey
(or look at the survey summary) all of those timestamps I added end up
clustered all together at the very end of the survey, and set with the same
time. I expected them to get set with the time at which the surveyor gets
to the hidden value question. Can someone help clarify why it works this
way? And ideally, give me some advice on how to have the timestamps be set
at the points where I inserted them into the survey. The point is to be
able to know at what time the surveyor finished question 10, 15, 20, etc in
the survey.

Thanks,

Ilya


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/d/optout.


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/d/optout.


Please excuse any syntax errors. This email was sent from my phone.
07932 107109.


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/d/optout.


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/d/optout.