Selecting a person

February 23, 2017

For random selection refer to this article. Here an example of determined selection is discussed.

Consider you wish to select a child attaining the lowest grade, with selecting younger children to break the ties. We define selname as a string variable:

    && IsAnswered(p.age)
    && IsAnswered(p.grade)
    && p.grade.InRange(1,98)

Note that if there are two or more children of the same age and grade exist in the same household, then the one entered first will be selected.

The variable may be subsequently referred to in the question texts or static texts with %-substitution:

​It is usually convenient to place all the continuation questions into a sub-section and lock it until the selection has been made.