homefeaturesexamplesDOCUMENTATIONblogpricingcontact us
technical documentationCATI documentationcookbookrobot

Displaying only some entries in a large list of answer categories

Problem

You have a large list of possible answer categories and you want to display only a relevant subset of them to the respondent.

Solution

Use the SUBSET keywork or the CODESIN keyword on the question name line.

Discussion

SUBSET

There are times when there are too many answer categories to show them all on-screen (e.g., a list of all municipalities in the country). The list of categories can then be reduced by using the SUBSET feature. When this feature is activated, only categories with a label containing certain characters are displayed. Here is how this works.

First, create a question with an open-end category that collects the few characters to search for. For example, insert a question requesting that the respondent enters a few characters of the name of the municipality where they reside; this question could be named "CHARS_OF_CITYNAME".

Second, create a regular question containing all possible answer categories (like all city names). Add other categories that you want to display all the time (e.g., Other, DK/NR) as required and give them an "F" behaviour (for "force display"). Add the keywork SUBSET= on the question name line of the question definition and complete it with the name of the variable containing the characters to search for, as in SUBSET=CHARS_OF_CITYNAME.

That's it. Upon using the questionnaire, only categories containing the few characters entered in the first question will be displayed when the second question is called up. Of course, these two questions cannot be part of the same screen as the formatting of the second requires that the answer from the first be available. The two questions need not immediately follow each other.

SUBSET type questions otherwise behave exactly like any other question. Therefore, a display condition can be applied to display the SUBSET question only when the initial question requesting a few characters to subset on has been correctly answered (and not left, for example, on a "Don't know").

CODESIN

The CODESIN= parameter of the question name line also performs a selection in the answer categories of the question to which it is attached. In this case, the only categories shown are those whose code is found in the open-end part named after CODESIN=. In the open-end part, the list of codes must be separated with "mu" characters (µ).

For example, the following code extracts part numbers from one data base based on price and displays only those part numbers in the follow-up question:

    PARTNUMBERS CALCUL
    % Text
      APARTNUMBERS = pull_value("UNIQUE","PARTNUMBER","PARTNUMBER_DB","APRICE > 10");
    % Note
    % Categories
     
    % Simple skips
    % Display condition
    % Open parts
      1 = C100
    ! ===================================================
    WHICHPART CODESIN=APARTNUMBERS
    % Text
      Select the appropriate part number
    % Note
    % Categories
    % Simple skips
    % Display condition
    % Open parts
    ! ===================================================

   

e-mail technical support!