# Constraint for Multipale Choice

**URL:** <https://forum.dimagi.com/t/constraint-for-multipale-choice/7040>\
**Category:** Users\
**Created:** [November 20, 2019, 5:56am UTC](https://forum.dimagi.com/t/constraint-for-multipale-choice/7040 "2019-11-20T05:56:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![326](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/326/32/689_2.png) [@326](https://forum.dimagi.com/u/326)\
**Post date:** [November 20, 2019, 5:56am UTC](https://forum.dimagi.com/t/constraint-for-multipale-choice/7040/1 "2019-11-20T05:56:31Z")

</div>

Dear All,  
Hope every body doing well! I have a question for constraint in multiple question I would appreciate if any one could support me, in a details I attached the screen shot for my question to make a better sense.  
Thanks,  
Samim

 ![Constraint](https://dimagi.b-cdn.net/uploads/default/original/2X/0/0ad47ab6797a4c408b292b75c4b43d6132c8e1a4.png)

---

<div class="post-metadata">

**Author:** ![Ethan\_Soergel](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/ethan_soergel/32/543_2.png) [@Ethan\_Soergel](https://forum.dimagi.com/u/Ethan_Soergel)\
**Post date:** [November 20, 2019, 2:54pm UTC](https://forum.dimagi.com/t/constraint-for-multipale-choice/7040/2 "2019-11-20T14:54:41Z")

</div>

Samim,

You should be able to do this with a validation condition. I think this should do it:

`if(selected(#form/why_not_treat, '999'), #form/why_not_treat = '999', true())`

That says:

> if '999' is selected, the answer must be exactly '999' (no other selections)  
> if '999' isn't selected, anything is fine.

---

<div class="post-metadata">

**Author:** ![326](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/326/32/689_2.png) [@326](https://forum.dimagi.com/u/326)\
**Post date:** [November 21, 2019, 8:11am UTC](https://forum.dimagi.com/t/constraint-for-multipale-choice/7040/3 "2019-11-21T08:11:36Z")

</div>

Dear Ethan\_Soergel,  
Thanks for collaboration! yest it's working well!
