| Item | Explanation |
|---|---|
| name_of_roster | Name of the collection to query |
| Query | Query operator |
| x | Anonymous variable that captures the queried content |
| x.var_to_query | Query variable(s); instance of that (those) variable(s) |


"Other (specify)" (96)@rowcodename_of_roster.Query(x=>x.var_to_query==1)
| Item | Explanation |
|---|---|
| name_of_roster | Name of the collection to query |
| Query | Query operator |
| x | Anonymous variable that captures the queried content |
| x.var_to_query | Query variable(s); instance of that (those) variable(s) |
true/false.true/false.
// all household members have a relationship to the head
// that is, the relationship variable is not `null`
members.All(x=>x.relationship != null)NOTE: this is often a pre-condition for a condition.
See the full example in “Case 2” here
/*
CONFIRM THAT THE AGE DIFFERENCE
BETWEEN THE HEAD AND CHILD IS APPROPRIATE
*/
// case 1: if head, no child in the roster whose age difference is too small
s01q03 == 1 ? !members.Any(x=>x.s01q03==3 && (s01q04_years - x.s01q04_years) < 13) :
// case 2: if child, no head whose age diffference is too small
s01q03 == 3 ? !members.Any(x=>x.s01q03==1 && (x.s01q04_years - s01q04_years) < 13) :
// case 3: if neither head nor child, OK
true? … :)
? ~= if? and : ~= then: ~= else!Any() == nonex. prefix
s01q03 == 1)