Desktop User Guides > Professional > Interview scripting > Writing interview scripts > Sorting categorical response lists > Displaying responses in reverse order
 
Displaying responses in reverse order
The rev (or reverse) keyword reverses the order of responses for each interview.
In the first interview, responses are displayed in the order they are defined in the response list.
In the second interview, the responses are displayed in reverse order, with the last response in the list appearing at the top and the first response in the list appearing last.
In the third interview, the response order is reversed, so that responses again appear in the order they are defined. And so it continues.
In the metadata section
To define a question with this kind of response list, type:
<question_name> "<text>" categorical [<number_of_responses>]
{

  <list_of_responses>
} rev;
For example:
Register "Some websites ask you to register with the site by
    providing personal information. When asked for such
    information how frequently do you falsify the information?"
    categorical [1.1]
{
  Never
  Rarely
  Occasionally
  Sometimes
  Mostly,
  NeverRegistered "Have never registered with a site"
} rev;
In the first interview the responses are presented in the order they appear here; in the second interview they are reversed.
In the routing section
To sort responses in reverse order using a statement in the routing section, type:
<question_name>.Categories.Order = OrderConstants.oReverse
If you specify ordering for a question in both the metadata and the routing section, the routing specification overrides the metadata specification.
For more information about defining order in the routing section, see Controlling response order from the routing section.
Reverse sorting does not apply to responses that have a fixed position in the response list. For more information, see Responses with fixed positions in the response list.
See also
Sorting categorical response lists