homefeaturesDOCUMENTATIONpricingcontact us
technical documentationCATI documentationcookbookrobot

Questionnaire design

Open-end part

An alphanumeric, numeric and other types of open-end component may be attached to any answer category. It is stored in a separate "question" which bears the same name as the originating variable to which the letter "A" is preappended. The definition of open-end parts follows this syntax: list the associated answer category code(s), separated by commas, left of an equal sign and add the open-end instructions right of the equal sign.

Example of an open-end segment:

    % Open-end part definition
    9 = C80

The syntax of the open-end instruction line is as follows (according to the type of data expected).

Controlling the size of the data entry box

Most open-end parts default to displaying a 4-line, 40-column box. The size of the box can be determined on a case-by-case basis using the following syntax:

    open-end_parameter n_rows n_columns

as in

    C30 1 20

which opens a 1-row, 20-column box to contain an alpha-numeric answer of a maximum of 30 characters.

Note: Unless "# Enforce response length" is set to YES, multi-line boxes do not implement the limit as to the acceptable number of characters; in this case, the limit is used only upon extracting a fixed-column file. Single-line boxes do constrain the input to the number of characters specified along with the open-end type. If "# Enforce response length" is set to YES and that the W modifier accompanies the C open-end (e.g., CW100 2 30), the value (here 100) is expressed in words rather than characters.

Numeric open-end parts always open a single-line data entry box; the width of this box is a function of the number of characters allowed by the open-end part definition.

Formatting numeric values

By default, numeric values supplied in open-end parts are not formatted; in fact, extraneous characters like dollar signs and percent signs are stripped from the value stored in the data base and French decimal commas are changed to English decimal points.

Using the following syntax, it is possible to display a formatted version of an open-end part in data entry boxes and in response recalls:

    1 = N5 FORMAT=formatxx

where

  • "FORMAT=" is a keyword that must be supplied as such;
  • "format" is one of the following values:
    • NUM: for a simple numeric value using xx decimals
    • DOLLAR or DOLLARS: for a currency value expressed in dollars
    • POUND or POUNDS: for a currency value expressed in Sterling pounds
    • EURO or EUROS: for a currency value expressed in euro
    • PERCENT or POURCENT or %: for a percentage value
    • TELEPHONE: for a telephone number stored as a 10-digit number
    • ZERO: returns z zero-padded version of an integer value
  • "xx" is the number of decimals to display (except for TELEPHONE where no xx is expected and ZERO where xx is the total number of positions in the final zero-padded integer value).

Therefore, 1 = N6.2 0 100 FORMAT=DOLLAR2 would display the open-end part as a dollar value with 2 decimals.

Note that the field width (6 in the example above) determines the width of the data entry box for a numeric value; this width must be sufficient to allow for the display of the formatted value.

Also note that the "format" keyword can be replaced by a substituted value in Perl (between braces) format; this allows for conditional formatting (e.g., displaying currency amounts as a function of a previous question).