Asking repeated questions
As a grid
To present a set of repeated questions as a grid, use this command in the routing section of the interview script as for an ordinary question:
LoopName.Ask()
This is the default if you do not specify a format.
The interviewing program displays the questions side by side in tabular form, using the values in the loop control list as the rows of the grid and the repeated questions as the columns.
Note If the set of repeated questions contains a compound item or is nested, the compound and/or nested items are ignored.
As a set of repetition pages
To display each repetition on a separate page, use this command in the routing section:
LoopName[..].Ask()
[..] means “for each item in the loop control list”; it tells the interviewing program to step through each value in the loop control list one at a time. The rest of the statement says “display the question”.
Each question on a separate page
If a loop contains more than one question, [..] displays all questions for a repetition on the same page. To display each question on a separate page, put these statements in the routing section:
Dim variable_name
For Each variable_name In loopname
variable_name.question_name1.Ask() ...
variable_name.question_namen.Ask()
Next
Parameters
variable_name
A name to identify the variable. It is used to point to each question in the loop in turn.
loopname
The name of the loop containing the repeated questions.
question_name1 to question_namen
The names of the questions in the loop.
Example
Dim thisq For Each thisq In YearLoop thisq.CarInsuranceCost.Ask() thisq.CarHowPaid.Ask() Next
Because each question is asked using a separate Ask statement, the interviewing program will present them on separate pages.
Asking selected repetitions only
You do not have to repeat loop questions for all iterations of the loop. To ask the questions for a particular repetition only, use this command in the routing section:
LoopName[Repetition].Ask()
For categorical loops, you can also use:
LoopName.Category.Ask()
Parameters
LoopName
The name of the loop.
Repetition
The repetition for which the question is to be asked. In a numeric loop, this is a numeric value from the range expression. In a categorical loop, this is a category text enclosed in braces; for example BrandLoop[{Brand1}].Ask().
Category
The category name; for example, BrandLoop.Brand1.Ask().
For more information about filtering loops see
Filtering loops.
See also