Translations of this page:
 

Filter questions (question filter)

If the participant's answer to a question is to have an effect on the further course of the interview, it is a filter question. You can define filters either directly in the question (question filter, simple variant) or under questionnaire ([:de:create:php-filters|PHP-Filter]]).

Define question filter

To define a question filter, select the filter question in the Question Catalog and then click on the Filter Question tab under More Settings. A filter consists of two parts:

  • In the Filter Condition you specify when the filter becomes active.
  • The Filter Effects determines what happens when the filter becomes active.

Important: The function is currently only available for questions of type “Selection”, “Dropdown selection”, “Horizontal selection” and “Multiple selection”. It will be successively extended to other question types.

Form to define a question filter

Important: For the filter to work, the filter question and the element (another question or text) affected by the answer must be on different pages in the questionnaire. Future versions of the program will also support questions on the same page – until this feature extension becomes available, it is possible to use the Immediately Show Questions when a Certain Option is Selected tutorial.

You can define one or more filters for a question. Once a filter has been defined and the question has been saved, it is marked with a symbol (symbol for filter questions in the question catalog).

Note: A filter is already saved with a click on the check mark, it is not necessary to save the question as well. However, the display in the navigation is not updated until the question is saved or another question is called.

Filter condition

A filter condition can either be true or false.

With a question filter, the filter condition refers only to the answer in the filter question. With PHP-Filters you can also link several variables in the filter condition (Linking Multiple Conditions).

Which variants of the filter condition are available depends on the type of question.

Filter effects

For the filter effects – that is, what happens when the filter condition occurs – the following options are uniformly available.

Show/hide question or text

Another question or text defined in the question catalog should be displayed or hidden depending on the filter condition.

Note: Text modules that were created under Text modules and labels cannot be shown or hidden with this filter condition.

In this filter navigation, use the dropdown to select a question or text from the question catalog and specify whether this is to be displayed or hidden if the filter condition applies.

Filter Guidance: Show Question

Important: The element to be shown or hidden must already have been placed on a page in the questionnaire under Questionnaire. Otherwise SoSci Survey does not know where to display the element. Furthermore, it must not be placed on the same questionnaire page as the filter question (work in progress).

Application example

  • On page 1 of the questionnaire there is a Yes-No question (selection) FF01 as to whether the respondent has a smartphone.
  • The question FF01 is defined as a mandatory question (“must be answered”), otherwise the filtering becomes unnecessarily unsafe (what shall be done if no answer has been given?).
  • On page 2 of the questionnaire (or on a later page) you have placed a question FF02 about the brand of the smartphone. This question shall only be displayed if the participant answered “Yes” in FF01.
  • In question FF01 a filter is defined under More SettingsFilter Question as follows:
    • Filter condition:
      If one of the following options has been selected …
      [x] Yes
    • Filter effect:
      Show/hide question or text
      Show [x] (otherwise hide)
      Frame/Text: FF02
  • Confirm the filter with the check mark or save question FF01 (Save question).

If the answer “No, I don't have a smartphone” is selected for question FF01, the question FF02 is hidden on the following page. Otherwise, it will be regularly displayed where it was placed at Questionnaire.

Alternatively, the filter could have been defined as follows:

  • Filter condition:
    If one of the following options was selected …
    [x] No
  • Filter effect:
    show/hide question or text
    [x] hide (show otherwise)
    question/text: FF02

The filter guidance with positive (top) and negative (bottom) wording has the same function, provided that the filter question is a mandatory question. Otherwise, the case “-9 no answer” must be dealt with explicitly.

If several filters compete for the display of the question FF02, hiding the question (whether by a positive or negative filter) has priority over displaying it. So if one filter wants to show the question and another filter wants to hide it, the question is not shown (hidden) in the interview.

Show/hide single items of a question

Not only a complete question can be hidden, but also individual items.

  • The same conditions apply as for showing/hiding an entire question: The question must be placed in the questionnaire, but not on the same page as the filter question.
  • Such a filter can only influence questions, not texts.

Show/hide page(s) in questionnaire

This filter effect leads to complete pages in the questionnaire being skipped.

Important: First give the pages a page id by which you refer to this/these page(s). If you enter a page number, a page identifier is automatically created – however, this is usually not as meaningful as a manually assigned page identifier.

Application example

On page 2 of the questionnaire, the participant is asked in a multiple selection (FF03) which online services he uses. Only if “Facebook” is selected pages 5 to 7 in the questionnaire shall be processed, which query Facebook usage more precisely.

  • Enter the page ID “fbStart” under Questionnaire Page 5.
  • Page 7 gets the page identifier “fbEnd”.
  • Enter a filter in the FF03 filter question in the question catalogue as follows:
    • Filter condition
      If one of the following options was selected …
      [x] Facebook
    • Filter effect
      [x] Show/hide page(s) in questionnaire
      [x] Show [x] (otherwise hide)
      Page(s): fbStart-fbEnd
  • Confirm the filter by clicking on the check mark.

Note: You can specify one or more pages to display or hide. Multiple pages can be specified either separated by a comma (“pg01, pg02, pg03, pg05”) and/or by a hyphen as page ranges from - to (“pg01-pg03, pg05”).

In this example, a negative wording would also be possible as an alternative to the positive wording of the filter:

  • Filter condition
    If the following options were not all selected …
    [x] Facebook
  • Filter effect
    [x] Show/hide page(s) in questionnaire
    [x] Hide (otherwise show)
    Page(s): fbStart-fbEnd

It goes without saying that only those pages that are further back in the questionnaire than the page with the filter question can be hidden.

Jump within the questionnaire

After clicking on “Next”, this filter effect jumps directly to the specified page in the questionnaire. A page id is specified here again.

Important: After the page has been answered, the questionnaire continues from there – the interview does not jump back to the page with the filter question.

Important: Jumping within the questionnaire should be used very cautiously. There are only a few cases in which this filtering actually makes sense. Often the filter effect show/hide page(s) in the questionnaire is more intuitive.

End interview (Screenout)

The interview is to be ended and a screenout text (farewell) is to be displayed.

The farewell is created beforehand as text in the question catalog.

Test filter and solve problems

To test the correct function of a filter, use the preview function under Questionnaire. Usually it saves a lot of time to start directly on the page with the filter question (Start from current questionnaire page) and use the debug mode for the test.

  • In debug mode, after answering the filter question, you can jump directly to the page where the filter shall become active. To do this, move the mouse over the page number in the top left corner.
  • In debug mode you can see if the filter condition is met (after clicking “Next”) and how it becomes active (on the page where the filtering affects the display). Click on Debug Information in the upper right corner.

A detailed description can be found in the Solving Questionnaire Problems manual.

If you do not find the error, please provide the following information in an online support question:

  • A description of what the filter shall do
  • That you are using a question filter (not a PHP filter)
  • The identification of the filter question
  • The identification(s) of the questions, texts, pages to be filtered
  • The Debug Information displayed when you click “Next” after answering the filter question.
  • The Debug Information on the page where the filter should become active and e.g. change something being displayed.

Caution: Multi-level filters

Question filters become active only if the filter question was displayed in the questionnaire. For example:

  • Question FF01 asks for ownership of a smartphone.
  • Question FF02 is only displayed if the participant owns a smartphone and asks for the brand of the device. Question FF02 is itself a filter question with 2 filters:
    • If the brand “Samsung” was selected, the page “samsung” should be displayed further back in the questionnaire – otherwise not.
    • If the brand “HTC” was selected, the page “htc” should be displayed, otherwise not.

Problems now arise if the participant indicates that he does not have a smartphone. Then question FF02 (brand) is not displayed at all. Their filters are not active and both the “samsung” and “htc” pages are displayed later in the questionnaire.

The solution is to add another filter to question FF01 (possession of a smartphone): If “No” is selected, then the pages “samsung, htc” should be hidden.

en/create/simple-filters.txt · Last modified: 09.11.2019 00:12 by d.aulenkamp
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki