Overwriting case property with missing value

In our application cases are retailers and we have forms for putting
retailers on the system and editing them.

In addition we have a visit form which gathers data when a retailer is
visited.

I am updating the visit form so that it checks for key missing data from
the case and, if data is missing from the case (eg retailer GPS location,
retailer gender etc), it requests it at the end of the normal visit form.

I'm doing this using hidden values which load the current value of the
property (which may or may not be missing) from the case. Then the visit
form has "additional questions" with display conditions on them so that
they are only displayed (ie asked) if the hidden value is '' or '---'.

Then, at the end of the visit form the values of the "additional questions"
are saved to the case.

My question is:

  1. If the "additional questions" (eg the retailer location) are not
    asked (because they are already known) what gets saved back to the case
    when the visit form is submitted? I'm concerned that a missing value might
    get saved back to the case and overwrite a known value. Although I could
    test this, I don't want to submit 'test' visit forms as there is no way of
    deleting them later and this will complicate analyses we do on this data in
    the future.

Thanks

Simon

Simon,

By default no not-displayed questions will be saved to the case. If the
display condition of a question is false then that node will (in XForm's
view) not exist and so the bind setting the case property to that value
will not fire.

Best,
Will

··· On Fri, Feb 19, 2016 at 12:31 AM, Simon Berry wrote:

In our application cases are retailers and we have forms for putting
retailers on the system and editing them.

In addition we have a visit form which gathers data when a retailer is
visited.

I am updating the visit form so that it checks for key missing data from
the case and, if data is missing from the case (eg retailer GPS location,
retailer gender etc), it requests it at the end of the normal visit form.

I'm doing this using hidden values which load the current value of the
property (which may or may not be missing) from the case. Then the visit
form has "additional questions" with display conditions on them so that
they are only displayed (ie asked) if the hidden value is '' or '---'.

Then, at the end of the visit form the values of the "additional
questions" are saved to the case.

My question is:

  1. If the "additional questions" (eg the retailer location) are not
    asked (because they are already known) what gets saved back to the case
    when the visit form is submitted? I'm concerned that a missing value might
    get saved back to the case and overwrite a known value. Although I could
    test this, I don't want to submit 'test' visit forms as there is no way of
    deleting them later and this will complicate analyses we do on this data in
    the future.

Thanks

Simon

--
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.

Thank you Will.

That's the reassurance I needed.

Regards

Simon
19/2/16

··· On 19 February 2016 at 16:11, William Pride wrote:

Simon,

By default no not-displayed questions will be saved to the case. If the
display condition of a question is false then that node will (in XForm's
view) not exist and so the bind setting the case property to that value
will not fire.

Best,
Will

On Fri, Feb 19, 2016 at 12:31 AM, Simon Berry simon@colalife.org wrote:

In our application cases are retailers and we have forms for putting
retailers on the system and editing them.

In addition we have a visit form which gathers data when a retailer is
visited.

I am updating the visit form so that it checks for key missing data from
the case and, if data is missing from the case (eg retailer GPS location,
retailer gender etc), it requests it at the end of the normal visit form.

I'm doing this using hidden values which load the current value of the
property (which may or may not be missing) from the case. Then the visit
form has "additional questions" with display conditions on them so that
they are only displayed (ie asked) if the hidden value is '' or '---'.

Then, at the end of the visit form the values of the "additional
questions" are saved to the case.

My question is:

  1. If the "additional questions" (eg the retailer location) are not
    asked (because they are already known) what gets saved back to the case
    when the visit form is submitted? I'm concerned that a missing value might
    get saved back to the case and overwrite a known value. Although I could
    test this, I don't want to submit 'test' visit forms as there is no way of
    deleting them later and this will complicate analyses we do on this data in
    the future.

Thanks

Simon

--
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 a topic in the
Google Groups "commcare-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/commcare-users/YsIcJWprt1o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.