Hello all,
I have a difficulty in enforcing constraints and i need your help.
I have three questions sex, age and relation_to_head.
sex with select one Male(1) and Female(2).
age with and integer value.
relation_to_head with select one option House head/Husband(1), House head/Wife(2), Child(3), Relative(4), Brother(5), Sister(6) and Maid(7).
I want to put the constraint on the relation_to_head question. what i want is
if sex=1 and age>12 then relation_to_head only options 1 or 3 or 4 or 5 or 7 are allowed.
if sex=2 and age>12 then relation_to_head only options 2 or 3 or 4 or 6 or 7 are allowed.
I need your help with this
I tried this constraint but it works only when age>12 only
((${sex}!=β1β or ${age}<=12) or (.=β1β or .=β3β or .=β4β or .=β5β or .=β7β)) and not(${sex}=β1β and ${age}>12 and (.=β2β or .=β6β))
here is my form
ttt.xlsx (10.7 KB)
Looking forward to your support as usual.
Thanks,