Display questions

I have created a form wherein a lot of branched questions are involved.
However, once a question is hidden, it is not being used for calculations.
Can somebody please help on how i can assign it a value of 0 when hidden
and use it for further calculations.

Hi Prachi,

By design the question is emptied and not set when the question is hidden.
I'd suggest modifying your form design to accomplish what you want; for
example, creating a hidden value that is set to the value you need.

Best,
Will

··· On Mon, Jan 19, 2015 at 9:14 AM, Prachi Patel wrote:

I have created a form wherein a lot of branched questions are involved.
However, once a question is hidden, it is not being used for calculations.
Can somebody please help on how i can assign it a value of 0 when hidden
and use it for further calculations.

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

Hey Prachi,

Specifically, where you're using the value in a calculation, you can use
the coalesce function. So instead of just using
/data/question_that_could_be_skipped in a calculation, use
coalesce(/data/question_that_could_be_skipped,
0)

This will either use the value of the skipped question, or 0 if it has been
skipped or is blank.

Thanks,
Sheel

··· On Mon, Jan 19, 2015 at 12:16 PM, William Pride wrote:

Hi Prachi,

By design the question is emptied and not set when the question is hidden.
I'd suggest modifying your form design to accomplish what you want; for
example, creating a hidden value that is set to the value you need.

Best,
Will

On Mon, Jan 19, 2015 at 9:14 AM, Prachi Patel prachi@cms-india.org wrote:

I have created a form wherein a lot of branched questions are involved.
However, once a question is hidden, it is not being used for calculations.
Can somebody please help on how i can assign it a value of 0 when hidden
and use it for further calculations.

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

--
Sheel Shah
Project Manager | Dimagi
m: +1.781.428.5419 | skype: sheel_shah