Professional > Interview scripting > Writing interview scripts > Filtering questions and response lists > Filtering categorical response lists > Responses that should not be filtered
 
Responses that should not be filtered
You do not have to allow all responses in a list to be filtered. If a response list contains an Other category, for example, you may not want that response to be affected by filtering that omits responses not chosen.
Syntax
To mark a response as being unfiltered, add nofilter to its definition as follows:
ResponseName ["ResponseText"] nofilter
Filtering completely ignores responses marked in this way, so the question that uses the filtered list will always include the unfiltered responses in its response list regardless of whether or not the response was chosen at a previous question.
The special na, dk, and ref responses have nofilter applied automatically. If you want them to be filtered the same as ordinary responses, include canfilter in the response definition. Note that canfilter is automatically applied when the na, dk, and ref responses are used as loop iterations.
Example
Here’s an example that illustrates this. The metadata defines three questions: the first will use the full list of insurance products, the second will use only those products not mentioned at HasInsurance, and the third will use only products mentioned at EnquiredThisYear. However, in each case we want to offer respondents the chance of mentioning an unlisted product, saying don't know, or not answering so we flag those responses with nofilter.
InsProducts define
{
Life,
CriticalIllness "Critical illness",
Buildings,
Contents,
Mortgage "Mortgage protection",
Income "Income protection",
Travel,
OtherInsProducts "Other insurance products" other nofilter,
NoInsProducts "None" na,
DkInsProducts "Can't remember / Don't know" dk
};
HasInsurance "Which types of insurance do you currently have?"
categorical [1..]
{
use InsProducts
};
EnquiredThisYear "And are there any other types of insurance
that you have considered buying in the past year or that you
are considering buying now?" categorical [1..]
{
use InsProducts
};
GotQuote "And of those products that you considered or are
considering buying, for which ones did you request a
quotation?" categorical [1..]
{
use InsProducts
};
The routing is quite straightforward:
HasInsurance.Ask()
EnquiredThisYear.Categories.Filter = _
EnquiredThisYear.DefinedCategories() - HasInsurance.Response.Value
EnquiredThisYear.Ask()
GotQuote.Categories.Filter = EnquiredThisYear.Response.Value
GotQuote.Ask()
If the respondent has life, travel, and health (other) insurance, the response list for EnquiredThisYear will include all the listed products except life and travel. It will also include Other because it is ignored by the filter, as well as None and Don't know which filtering always ignores.
If the respondent has enquired about buildings, contents, and car (other) insurance, the response list for GotQuote will contain those three items. It will also include None and Don't know because they are ignored by the filter.
Note This example is adequate to illustrate how nofilter works. If you want to use something similar in your own surveys, you will probably want to alter it so that it does not ask GotQuote if the respondent did not make any insurance enquiries (you could place the question in an If statement or set its MustAnswer property to False). You may also like to use text substitution to display the text of any Other answers in the EnquiredThisYear and GotQuote response lists. For more information, see Variable response texts.
See also
Filtering categorical response lists