Referring to a question in roster2


I hope e everything is fine.
I have a two level roster and I want a certain question that comes right after those rosters to be enabled if the last the question of the 2nd level of roster takes a certain value. So, I am wondering if anyone here could please help with this.


This is possible in Survey Solutions. But, imho, hardly desirable. A roster implies a parallelism in the interview, where e.g. an interview may continue with one person or the other. In fact in some packages (e.g. Blaise) this is exactly the keyword with which you declare a roster.

I envision your question stems from some inefficiencies of a paper questionnaire design, where this last question’s value is in fact something like “the age of the youngest child” or a similar value that can be easily calculated.

What is precisely the situation there?

Thank you very much for your response, Sergiy.

Basically, I have two subsections (first crop season and second crop season) within which I have those two rosters (the first level of roster I have the plot and within the plot I have crop roster). So, what I want to do is enable the second subsection (second crop season) only if all questions of first crop season subsection are filled. The issue now is how I can refer to last question of the second level of roster in the enabling condition.


Well, Bordalo, this is exactly the situation I was referring to, there is no causal relationship between season 1 and season 2 (if there is one, please explain), and your implied condition is based on “what I want to do…” not on the properties of objects being surveyed. Compare this, for example, with the situation

Q1: Are you male or female?
Q2: Are you pregnant right now?

The second question doesn’t make sense if the respondent is male. So the condition is dictated by the properties of the objects being surveyed, and the condition Q1==2 (suppose 2 is code for female) automatically suppresses the second question until the first one is answered with 2.

The contrary is likely to happen, there will be households, which were not present in the area in the 1st planting season, but present in the 2nd (hence they can’t answer all the questions in the 1st season block), or they responded don’t know, or other similar cases.

Simply determining, which question is last may be non-trivial when there is a complex logic within the season block (let’s say out of 100 questions in that block 75 have various conditions on the previous questions…).

My advice would be don’t do it.

But since you are likely to proceed anyways, to refer to any question in the 2nd level nested roster one may utilize the following condition:


  • R1 and R2 are names of the rosters of the 1st and 2nd level of nesting (plots and crops in your example),
  • QuestionName is the name of the last question in that 2nd level and
  • LastRowCodeValueInR1 and …R2 are the highest rowcodes in the corresponding rosters (those you should figure out from the corresponding trigger questions).

Note that you can’t place the seasons in the roster (e.g. fixed with 2 seasons) since such a condition would create a circular link, which will not compile, so the design with subsections is correct in this context (or if the questions on S1 are very different from questions on S2). But in the other case (similar questions and no artificial requirement that you are trying to impose) I would put a top level roster for seasons to simplify the design and output data structure.

Best, Sergiy

i have somewhat a similar problem. See i have a questionnaire that has a roster(sources of media information) and this roster has a roster(newspapers) within it: after some questions.
My problem is, how can i enable the second roster(newspapers) only when 7th option (newspapers) of the roster(sources of media information) is selected/answerd.

i tried this F3 == 1 && (@rowcode == 7) but the result is it only displays the 7th option of the second roster is enbled…while i wanted all the questions of the 2nd roster but just under the 7th option/question under the second roster.
is there a way i can enable the second roster only when the 7th option under the first roster answered as yes(1)??

duplicate of

see discussion there