Desktop User Guides > Professional > Interview scripting > Interview scripting: Getting started > Writing single choice and multiple choice questions
 
Writing single choice and multiple choice questions
Single choice and multiple choice questions offer a list of choices from which respondents can choose one, or sometimes more, responses. The general name for these types of questions is categorical.
In this example, we will write two categorical questions. The multiple choice question looks like this when asked:
This graphic is described in the surrounding text.
Procedure
1 Enter a name and a text for the categorical question, followed by the categorical keyword to specify that this is a categorical question:
HowDrink "How do you take tea?" categorical
2 Specify how many responses are allowed. In this example, one or more responses are allowed because you might drink tea in a number of ways. This is known as a multiple-response categorical question. The number of responses allowed for this question is defined as at least one, with no maximum, and must be in square brackets:
HowDrink How do you take tea?" categorical [1..]
3 Enter the responses for the question. The responses in the list must be separated by commas, and the whole list must be enclosed in braces. End the question with a semicolon:
HowDrink "How do you take tea?" categorical [1..]{
  Black,
  WithMilk,
  WithLemon
};
4 Response names cannot contain spaces, punctuation, or other symbols, but in this example some of the responses such as With Milk should be displayed with spaces. For these responses, enter the text you want to display, enclosed in double quotation marks, after the response name:
HowDrink "How do you take tea?" categorical [1..]
{
  Black,
  WithMilk "With milk",
  WithLemon "With lemon"
};
5 Add an other response so that respondents can enter some other way of taking tea that has not been included in the list of choices. Like the rest of the responses in the list, the other response has a name, OtherTakeTea, and an optional label, “Some other way”. The other keyword is what specifies that it is a special response. An other response has a box so that the respondent can enter text.
HowDrink "How do you take tea?" categorical [1..]
{
  Black,
  WithMilk "With milk",
  WithLemon "With lemon",
  OtherTakeTea "Some other way" other
};
6 The second categorical question allows only one answer to be chosen and is known generically as a single-response categorical question. It looks like this when asked:
This graphic is described in the surrounding text.
7 Define the question as follows. The response range is defined as [1..1], meaning that only one response can be chosen. You can abbreviate this to [1], but when you close and reopen the file, it changes to [1..1].
BagOrLoose "Do you mostly use tea bags or loose tea?" categorical [1..1]
{
  TeaBags "Tea bags",
  LooseTea "Loose tea"
};
8 Press F5 to run your script.
Requirements
UNICOM Intelligence Professional with Interview Scripting.
Next
Writing a Date/Time question
See also
Interview scripting: Getting started