Desktop User Guides > Professional > Interview scripting > Writing interview scripts > Shared lists > Changing the order of responses in a shared list
 
Changing the order of responses in a shared list
You can change the order in which the responses in a shared list are displayed by using one of the ordering keywords.
Ordering keywords
asc
Present responses in alphabetical order, A to Z.
desc
Present responses in reverse alphabetical order, Z to A.
ran
Display responses in a random order every time it is used, even if within the same interview.
The sublist keyword is required in order for randomization to work. If you forget it, responses are always displayed in the order they appear in the list.
rev
Reverse the order of the responses in the list for alternate interviews. Responses in the list are presented in reverse order for the first, third, fifth, and so on, interviews and in the defined order for other interviews.
rot
Rotate responses so that each interview starts at a different position in the response list while keeping the responses in the same order overall.
If you want to use the same ordering method every time the list is used by a question, include the ordering keyword as part of the list specification. If you want to apply different ordering methods to the list at different questions, put the ordering keyword in the question specification.
Examples
The following examples illustrate the different approaches. In the first example the YogurtBrand shared list is used twice, once with its responses presented in rotation and once with the responses presented in the order they are defined. Because of this, the rot keyword is put on the question that requires the rotated list.
BrandList define
{
Alpine,
Finborough,
Alsace,
DairyFresh "Dairy Fresh"
};
ChocBarKnow "Which of the following brands of frozen
chocolate bars have you heard of?" categorical [1..]
{
use BrandList
} rot;
ChocBarBuy "And which brands of frozen chocolate bars
do you usually buy?" categorical [1..]
{
use BrandList
};
In the following example, the responses in the Flavors list are always to be presented in a random order, so ran is included as part of the list definition.
Flavors define
{
Strawberry, Raspberry, Mango, Apricot, Pineapple
} ran;
Likes "Which of the following flavors do you like for
frozen desserts?" categorical [1..]
{
use Flavors sublist
};
Dislikes "And are there any flavors that you do not like?"
categorical [1..]
{
use Flavors sublist
};
See also
Shared lists