Actions

QS

QS : filtre de tableau

From LimeSurvey Manual

Revision as of 15:19, 29 August 2023 by Maren.fritz (talk | contribs) (Created page with "'''Comment définir un filtre'''")


Filtre de tableau (array_filter)

Description

Le paramètre Filtre de tableau vous permet d'utiliser n'importe quelle question à choix multiples pour sélectionner ou définir les réponses qui seront affichées dans une liste, un tableau ou une question à choix multiples ultérieure.

Les questions suivantes peuvent être filtrées sur n'importe quel type de question matricielle, y compris :
  • Choix multiple
  • Choix multiple avec commentaires
  • Texte court multiple
  • Numérique multiple
  • Tableau (5 points, 10 points, Oui/Non/Inconnu, Augmentation/Identique/Diminution, Colonne)
  • Tableau (double échelle, texte, nombres)
  • Classement

De plus, chacun de ces types de questions peut être filtré.

La seule exception est « Array (Column) », qui peut filtrer d'autres questions, mais pas elle-même.

Comment définir un filtre

To set a filter, enter the question code of a multiple options question in the array filter box of the question you are currently editing. The respective question will be used as the source of information for the current question, the selected answers from the previous question being retrieved and used as answer options for the current question. For example, if your source multiple option question code is "Q1", enter "Q1" into the 'Array Filter' box to start the filtering process of the answers. Only the answer options that are selected in question Q1 will be visible in the array_filter-ed question.

If you wish more questions to be filtered via this option, type the question codes in the box separated by semicolons (;).
  The subquestion codes used in the first question must coincide with the subquestion codes from the second one. Otherwise, the array filter function will not filter the answers to the first question. Note: When you want to filter the "other" answer option from the first question, you need to provide a subquestion for this answer in the second question and the subquestion code for this answer needs to be "other". Check the below example to better understand how the whole system works.


If multiple choice allow other setting: you can choose other for subquestion code and filter with other checked or not.

Cascading

The selected options can be displayed in cascade. This means that you can select a question which filters another question, which filters another question, and so on.

Array filter example

Let's take a look at the following example to better understand the power of this setting:



In the screenshot from above, we got two questions. The first one is a multiple short text question type, while the second one is an array dual scale question type. The answers you provide in the first question will be listed in the second one. Technically, the answers you provide to the subquestions from the first question are filtered and displayed in the second question.

This example can be downloaded from the following link: limesurvey_group_32.lsg. Import this question group into your LimeSurvey installation.