# Display questions

**URL:** <https://forum.dimagi.com/t/display-questions/2030>\
**Category:** Users\
**Created:** [January 19, 2015, 2:14pm UTC](https://forum.dimagi.com/t/display-questions/2030 "2015-01-19T14:14:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prachi\_Patel](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Prachi\_Patel](https://forum.dimagi.com/u/Prachi_Patel)\
**Post date:** [January 19, 2015, 2:14pm UTC](https://forum.dimagi.com/t/display-questions/2030/1 "2015-01-19T14:14:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![William\_Pride](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/w/b19c9b/32.png) [@William\_Pride](https://forum.dimagi.com/u/William_Pride)\
**Post date:** [January 19, 2015, 5:16pm UTC](https://forum.dimagi.com/t/display-questions/2030/2 "2015-01-19T17:16:15Z")

</div>

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](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Sheel\_Shah](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/s/779978/32.png) [@Sheel\_Shah](https://forum.dimagi.com/u/Sheel_Shah)\
**Post date:** [January 19, 2015, 5:36pm UTC](https://forum.dimagi.com/t/display-questions/2030/3 "2015-01-19T17:36:27Z")

</div>

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](mailto: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](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/d/optout](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](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Sheel Shah  
> Project Manager | Dimagi  
> m: +1.781.428.5419 | skype: sheel\_shah
