Professional > Interview scripting > Writing interview scripts > Page layout facilities > Styles > Categorical response lists > Rows or columns, and how many?
 
Rows or columns, and how many?
The default is to display categorical responses one below the other in a single column down the page. With long response lists you can save space, and save respondents having to scroll to reach the navigation buttons, by displaying the response list in more than one column. Even with short response lists you can save space by displaying the responses across the page rather than down. You may even find that the way you display the responses affects which responses are most likely to be chosen.
In the metadata section
To specify the orientation of the response list, place the following after the question text:
style(orientation = Direction)
where:
Direction is either Column, Row, or Default (the default category orientation by the Player).
When you choose row orientation and do not define the number of rows required, the interviewing program displays all responses on a single line, and attempts to space the responses evenly within the line width. If you reduce the size of the display window you will see that the responses' positions alter so that they still fit within the window’s width. When it is no longer possible to reduce the spacing between responses, a horizontal scroll bar is displayed.
To specify the number of rows or columns, place one of the following after the question text:
style(columns = Number)style(rows = Number)
where:
Number is the number of rows or columns required.
For example:
Sports11 "Which of the following sports do you play?"
  style(orientation = column, columns = 2) categorical [1..]
{Tennis, Football, Cricket, Basketball, Hockey};
displays the responses column-wise in two columns:
whereas:
Sports12 "Which of the following sports do you play?"
  style(orientation = row, rows = 2) categorical [1..]
{Tennis, Football, Cricket, Basketball, Hockey};
displays the responses row-wise in two rows:
In the routing section
To set the response list orientation in the routing section, type:
Qname.Style.Orientation = Orientations.Direction
where:
Direction is one of orColumn, orRow, or orDefault (the default orientation used by the Player).
To set the number of rows or columns, use
Qname.Style.Rows = NumberQname.Style.Columns = Number
If the question is defined as:
Sports "Which of the following sports do you play?" categorical [1..]
{Tennis, Football, Cricket, Basketball, Hockey};
the statements:
Sports.Style.Orientation = Orientations.orRow Sports.Style.Rows = 3
will display the response list across the page in three rows:
If you do not get what you asked for
Sometimes it may seem that the interview scripting program is ignoring your instructions for the number of rows or columns required. This is often because your specification does not work well with the number of responses in the response list. When the interviewing program lays out a response list in columns, it counts the number of responses to be displayed and then works out how many rows it will need to display those responses in the requested number of columns. It then fills those rows on a column-by-column basis. Depending on how many responses there are in the list, this many mean that you get fewer columns than you requested.
For example, if the response list contains 26 responses and you ask for it to be displayed columnwise in 25 columns, the interview scripting program calculates that it needs two rows to do this. It then starts allocating responses to columns, filling one column before starting the next one. This means that responses 1 and 2 go into columns 1, responses 3 and 4 go into column 2, and so on until responses 25 and 26 go into column 13.
You cannot mix and match row and column orientation with row and column counts. For example, you cannot set the orientation to columns and then specify the number of rows required. The interviewing program will display the response list in one column; it will not display the responses column-wise in the given number of rows. Therefore, you have two options for resolving the problem. Either, you can calculate for yourself the number of rows that will be required and then specify row orientation and the number of rows required to generate the number of columns you want. In the example, you will need to specify two rows laid out in row orientation. This lays out responses sequentially across the page, with responses 1 to 13 in row 1 and 14 to 26 in row 2. Or, if you must have responses listed down the page, you can reduce the number of columns.
See also
Categorical response lists