Skip to content

then

Experiments Surveys & forms

then lists the destinations executed when the paired if conditions match (or unconditionally when there is no if). It is the master switch for a trial’s conditional logic: a row’s conditions are only checked when its then cell is filled in. Use it to jump to rows or labels, repeat trials, end the experiment, screen participants out, start a break timer, or redirect to an external URL.

Put a single destination in the cell, for example then="10" to jump to trial-file row 10 or then="practice_start" to jump to a labeled row. On its own, that destination is taken every time the trial runs.

To branch, list several destinations separated by ; and write the matching conditions in the paired if cell. They pair up in order: destination 1 with condition 1, destination 2 with condition 2, and so on.

You may add one destination more than there are conditions. It acts as an “otherwise” and is taken when no condition matched. Any further extras are ignored.

DestinationEffect
0Repeat the current trial
positive integer NJump to trial-file row N, where the header is row 1 and the first trial is row 2. If that row is not part of this participant’s trial order (because of randomization or subject groups), the experiment ends
+N / -NMove N positions forward or backward in the order the participant actually sees; moving past either end ends the experiment
end (case-insensitive)Ends the experiment
screenoutMarks the participant as screened out (only when the project has screenout configured, and never in preview), then continues; the screenout screen appears at the start of the next trial
timer:startStarts the timed-break clock and continues to the next trial. Its presence also makes every time-based break wait for it
http://... / https://...Sends the participant to that address. %%url_x%% placeholders are filled from the study’s own query parameters, %var% references are replaced, the current query parameters are appended, and the experiment stops there
any other stringJump to the first trial row carrying that label. A label whose row is not in this participant’s order ends the experiment; an unknown label continues to the next trial

Leave the cell empty on every row that should simply carry on to the next trial. On the last row of the file, an empty then is also what lets the experiment finish.

  • then filled in with no if on the row: the first destination is taken every time.
  • then filled in but no condition matched: the participant continues with the next trial.
  • Spaces around each destination are ignored.
  • if: conditions and destinations pair up in order, and the first true condition decides where the participant goes. See the if page for the condition grammar.
  • End of the experiment: the last row does not finish the experiment when its then is filled in, which is what lets you jump backwards from the final row.
  • Screening: any then cell containing screenout marks the project as having a screening section. Screening progress is tracked from the screenout rows the participant actually reaches: they count as having passed screening once at least one screenout row has been shown, they were not screened out, and no screenout row is still ahead of them.
  • break: a break row’s then runs when the break ends, and a last row with break set also keeps the experiment from finishing.
  • Setup screens: destinations only take effect after a regular trial, never after consent, calibration or participant-details screens.
  • staircase: when no destination fires, staircase decides the next row.

Screen out non-consenting participants, otherwise continue:

typetrialTextkeyboardifthen
testAre you over 18? (y/n)y nnscreenout

Three-way branch plus fallback (b→row 10, c→label, anything else→end):

typetrialTextkeyboardifthen
testPick a b or ca b cb;c10;section_c;end

Redirect to an external survey at a decision point:

typetrialTextkeyboardifthen
testDone. Press spacespacespacehttps://example.com/exit?pid=%%url_pid%%
  • A misspelled label is indistinguishable from “no jump”: the participant continues with the next trial and nothing warns you.
  • Any destination containing the word timer is treated as a break-clock action, and only timer:start actually does something. Other timer... spellings do nothing at best and stop the experiment from starting at worst, so write it exactly.
  • then="-0", and any other destination with a sign in front, is a relative move rather than a row number.

then appears in these worked recipes:

  • Skip on response: Ask one question and jump participants who answer yes straight past the practice block.
  • Accuracy-gated progression: Let participants advance to the test block only once their practice accuracy clears a threshold.
  • Branching questionnaire: Route participants to different questionnaire pages depending on their answer to an earlier question.
  • Screener then branch: Ask one eligibility question up front and end the session for participants who do not qualify.