Characteristics of 'or' on Form Designer

Hello All,

Please I need help, I have been on this formular for two days now. It’s a
display condition for a multi-select question: /registration/immediate_danger_sign
= 'headaches' or /registration/immediate_danger_sign = 'fever' or
/registration/immediate_danger_sign = 'joint_pain' or
/registration/immediate_danger_sign = 'vomiting'

It does not work the way I want it to: selecting any one of the options, it
displays correctly, but selecting two or more, it does not display. Just
wondering if this is an error with the Form-Designer or am I missing
something out.

Thank you

-Emeka-

you should use:

selected(/registration/immediate_danger_sign, 'headaches')
or selected(/registration/immediate_danger_sign, 'fever)
or selected(/registration/immediate_danger_sign, joint_pain') etc.

··· On Fri, Aug 10, 2012 at 10:53 AM, Emeka Chukwu wrote:

Hello All,

Please I need help, I have been on this formular for two days now. It’s a
display condition for a multi-select question: /registration/immediate_danger_sign
= 'headaches' or /registration/immediate_danger_sign = 'fever' or
/registration/immediate_danger_sign = 'joint_pain' or
/registration/immediate_danger_sign = 'vomiting'

It does not work the way I want it to: selecting any one of the options,
it displays correctly, but selecting two or more, it does not display. Just
wondering if this is an error with the Form-Designer or am I missing
something out.

Thank you

-Emeka-

i.e the 'selected' function checks if the answer to a multi-select contains
the given choice

··· On Fri, Aug 10, 2012 at 11:00 AM, Drew Roos wrote:

you should use:

selected(/registration/immediate_danger_sign, 'headaches')
or selected(/registration/immediate_danger_sign, 'fever)
or selected(/registration/immediate_danger_sign, joint_pain') etc.

On Fri, Aug 10, 2012 at 10:53 AM, Emeka Chukwu emeka2015@gmail.comwrote:

Hello All,

Please I need help, I have been on this formular for two days now. It’s a
display condition for a multi-select question: /registration/immediate_danger_sign
= 'headaches' or /registration/immediate_danger_sign = 'fever' or
/registration/immediate_danger_sign = 'joint_pain' or
/registration/immediate_danger_sign = 'vomiting'

It does not work the way I want it to: selecting any one of the options,
it displays correctly, but selecting two or more, it does not display. Just
wondering if this is an error with the Form-Designer or am I missing
something out.

Thank you

-Emeka-

Hi Emeka,

Sorry you spent so much time on this!

For more on multiselects and other common logic, you can also refer to this
wiki page:
https://wiki.commcarehq.org/display/commcarepublic/Common+Logic+and+Calculations

Thanks,
Amelia

··· On Fri, Aug 10, 2012 at 11:00 AM, Drew Roos wrote:

you should use:

selected(/registration/immediate_danger_sign, 'headaches')
or selected(/registration/immediate_danger_sign, 'fever)
or selected(/registration/immediate_danger_sign, joint_pain') etc.

On Fri, Aug 10, 2012 at 10:53 AM, Emeka Chukwu emeka2015@gmail.comwrote:

Hello All,

Please I need help, I have been on this formular for two days now. It’s a
display condition for a multi-select question: /registration/immediate_danger_sign
= 'headaches' or /registration/immediate_danger_sign = 'fever' or
/registration/immediate_danger_sign = 'joint_pain' or
/registration/immediate_danger_sign = 'vomiting'

It does not work the way I want it to: selecting any one of the options,
it displays correctly, but selecting two or more, it does not display. Just
wondering if this is an error with the Form-Designer or am I missing
something out.

Thank you

-Emeka-

--
Amelia Sagoff

Thanx guys, it worked.
-Emeka-

··· On Fri, Aug 10, 2012 at 4:01 PM, Amelia Sagoff wrote:

Hi Emeka,

Sorry you spent so much time on this!

For more on multiselects and other common logic, you can also refer to
this wiki page:
Common Logic and Calculations - CommCare Public - CommCare Public

Thanks,
Amelia

On Fri, Aug 10, 2012 at 11:00 AM, Drew Roos droos@dimagi.com wrote:

you should use:

selected(/registration/immediate_danger_sign, 'headaches')
or selected(/registration/immediate_danger_sign, 'fever)
or selected(/registration/immediate_danger_sign, joint_pain') etc.

On Fri, Aug 10, 2012 at 10:53 AM, Emeka Chukwu emeka2015@gmail.comwrote:

Hello All,

Please I need help, I have been on this formular for two days now. It’s
a display condition for a multi-select question: /registration/immediate_danger_sign
= 'headaches' or /registration/immediate_danger_sign = 'fever' or
/registration/immediate_danger_sign = 'joint_pain' or
/registration/immediate_danger_sign = 'vomiting'

It does not work the way I want it to: selecting any one of the options,
it displays correctly, but selecting two or more, it does not display. Just
wondering if this is an error with the Form-Designer or am I missing
something out.

Thank you

-Emeka-

--
Amelia Sagoff