> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pollandroll.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pre-filled variables, recodes and scorings

> Create derived variables to filter, group and prepare the analysis.

Beyond the raw answers, the editor lets you create **derived variables**: groupings (recodes) and scores. They are used to filter, to segment and to prepare the analysis. The respondent does not see them.

## Recodes: group and recalculate

A **recode** creates a new variable from the answers: subtotals, groupings, crosstabs. For example: grouping "dog" and "cat" under "mammals", or creating age brackets.

A recode starts from a **closed or numerical** question, except grids, which cannot be recoded. An open-ended question cannot be recoded this way: its answers go through **Coding**.

<Steps>
  <Step title="Create the recode question">
    Add a question (usually a Single choice one) and place the subtotals or categories you want in it.
  </Step>

  <Step title="Assign the original items">
    With the **arrows** function, attach each original item to the right subtotal.
  </Step>

  <Step title="Hide the question">
    Hide it: it is a technical variable, the respondent must not answer it.
  </Step>
</Steps>

<Warning>
  A recode behaves like a question. If a respondent falls into **no** category, they can end up blocked. Check that every respondent is covered, or set a filter on the recode. Also distinguish single choice from multiple choice: multiple membership that is set up badly can block the path.
</Warning>

### Automatic recodes

Some recodes are provided ready-made:

* **Random allocation**: distributes each respondent into one or several **cells** (e.g. showing 3 concepts out of 5). An option balances the number of respondents per cell. The questions are then filtered according to the cell assigned.
* **Postcode recoding**: turns a French postcode into a region, a department or an urban area size. This variable then serves as a filter or as an analysis axis.

<Tip>
  For a long list, a recode can also be built by **CSV import** (a file of inputs and outputs), rather than item by item.
</Tip>

## Scoring: award points

**Scoring** (Sigma icon) awards points to items. Two uses:

* **Calculating a score** according to the answers, based on business logic (e.g. 1 point per brand "know and use regularly", for an awareness score).
* **Counting** the number of items selected.

The score obtained then serves as a filter (e.g. score ≥ 3) or as an analysis criterion. Scoring works on any type of question, including grids.

<Warning>
  The score is calculated **from the scoring question onwards**, in questionnaire order. To filter a question on this score, place it **after** the question that carries the scoring: a filter placed before it will not see the score yet.
</Warning>

## Where these variables live

| Point | What to remember |
| - | - |
| **Display of the variable** | Visible in Results by default. You can limit it to the individual data, or hide it completely (visible only in the questionnaire). |
| **Created in the editor or in Results** | Recodes can also be created after fieldwork, in the Results area. |
| **Recode tied to the survey** | A recode created in Results is attached to the survey: it disappears when the survey is duplicated. To reuse it, create it **upstream, in the template**. |

<Note>
  The **AI review** spots the classic pitfalls: item missing from a recode or a scoring, duplicate variable name, respondent likely to end up blocked. A useful habit before launching fieldwork.
</Note>

## Pre-filled variables

A **Pre-filled variable** is a question whose answer is **passed in the launch URL**, then retrieved from the sample source (panel or client file), instead of being asked of the respondent. This is the mechanism that pre-fills the profile data (age, gender, region…) without asking for it again.

| Setting | Where | Effect |
| - | - | - |
| **Pre-filled variable** status | Settings of a **question** (numerical, text, single or multiple choice) | The answer is passed in the URL and retrieved on the sample source side. |
| **Hidden to respondents** visibility | Setting of a **recode** | The variable is not displayed in the respondent questionnaire. |

### Make a question pre-filled

In the **Question settings**, turn on **Use as pre-filled variable**, then enter a **Name of the pre-filled variable**. It is this name that will be expected in the URL and that appears in the Launch tab.

<Warning>
  Give each pre-filled variable a **unique name**, identical between the sample source (URL) and the platform. Two variables with the same name create a duplicate and make the questionnaire inaccessible for testing.
</Warning>

<Tip>
  Place the pre-filled variables **at the very beginning of the questionnaire**: an ordinary question placed before them triggers a warning and the value may not be taken into account.
</Tip>

The way to fill in the values in the link is detailed in **[Launch](/en/collecte/lancement)**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.