Skip to content

score

Surveys & forms

Awards points for the answer chosen on a trial, mapped positionally onto the trial’s responseOptions. Points accumulate per named group across the session; per-trial points are written to a responseScore results column and group totals to a participant-level score field at the end. In practice this works on form/survey trials only; see Tips & gotchas for why regular keyboard/button test trials break.

Put one number per answer option, separated by semicolons: 0;1;2 gives the first responseOptions entry 0 points, the second 1, and the third 2.

[group:]<int>[;<int>...]
  • An optional group prefix collects the points under a named total, for example anxiety:0;1;2. Group names may contain letters, digits and underscores. Without a prefix, points go to the default group, named score.
  • The numbers are whole numbers; negatives are allowed. The Nth number is the score for the Nth entry of the responseOptions column.
PieceAccepted valuesNotes
group prefixletters, digits or underscores, followed by :e.g. anxiety:; omitted -> group score
score listintegers, - allowed, ;-separatedposition matches responseOptions position
  • If the column is absent or the cell is left empty, the trial is not scored and its responseScore entry stays empty.
  • A response that equals none of the responseOptions entries scores 0.
  • Fewer scores than options: the surplus options score 0 when chosen. Extra scores beyond the options count are ignored.
  • Output: per-trial values go into a responseScore results column; the column reaches the results file only if at least one trial produced a value. Value format: bare points for the default group, group:points for named groups.
  • Totals: at experiment end a participant-level score field lists every group total as a ;-joined list, where named groups appear as group:total and the default group as a bare number.
  • responseOptions supplies the answers the points map onto; the recorded response must exactly equal one of those (trimmed) option strings to earn its points.
  • Only form/survey trials pass the chosen answer to scoring; regular test trials do not (see Tips & gotchas).
  • Multi-question, multi-row and multi-stim forms combine their answers into one joined string before scoring, which never matches a single option, so those trials score 0. Score single-answer form trials only.
  • No %score% variable exists during the run: the total only exists at the very end, so feedback text and if conditions cannot reference the running total.

Simple survey scoring (Never=0, Sometimes=1, Often=2), results column responseScore gets 0/1/2 per trial and the final score field the sum:

typestimFormatresponseTyperesponseOptionsscore
testsurveyradioNever;Sometimes;Often0;1;2

Named groups on different trials; final score field looks like anxiety:5;mood:3:

typestimFormatresponseTyperesponseOptionsscore
testsurveyradioNever;Sometimes;Oftenanxiety:0;1;2
testsurveyradioSad;Neutral;Happymood:-1;0;1
  • A score cell containing no digits at all (for example bonus) stops the experiment before the first trial is shown.
  • Decimals are not supported: 1.5;2 is read as just 1, so the second option silently gets no score.
  • Group names cannot contain hyphens: a prefix like sub-scale:0;1 is silently read as group scale, and the sub- part is dropped.
  • A single number is not a flat award: values map positionally to responseOptions, so a bare 10 gives 10 points only when the first response option is chosen.
  • Conditions such as if="score>=50" are not supported; the running total is not available to conditional logic.

score appears in these worked recipes: