A similar to previous post (sorry for double posting, previous was left as a comment)
I need to enable section if a number of alive children from the roster for one woman is either above 0 or equal 0. However, it doesn’t accept the expressions.
The warning is - Operator > cannot be applied to operands of type bool and int.
Both q216 and p216 (child being alive) are categorical single select with a dichotomous choice of 1 (yes) and 2 (no).
ros.Count(x=>(x.q216==1)>0 || ros_preg.Count(x=>(x.p216==1)>0
ros.Count(x=>(x.q216==1)==0 || ros_preg.Count(x=>(x.p216==1)==0
I tried this, but still unsuccessful:
ros.Count(x=>(x.q216==1)>0) || ros_preg.Count(x=>(x.p216==1)>0)
ros.Count(x=>(x.q216==1)==0) || ros_preg.Count(x=>(x.p216==1)==0)
I am sure it is problem with parenthesis again but can’t figure out the correct combination. Suggestions are very welcome.
I suppose the fix could be to create a number of intermediate variables:
ros.Count(x=>(x.q216==1)>0
ros.Count(x=>(x.q216==1)==0
But it also gives an error: [WB0027]:Expression has a syntax error.
Any suggestions are very welcome, thank you beforehand.