Skip to content

Skip on response

Ask one question and jump participants who answer yes straight past the practice block.

Use this when part of the trial file is optional for some participants: returning participants who already know the task, people who decline an optional questionnaire, or anyone whose answer makes a whole section irrelevant. Forcing everyone through the same fixed sequence wastes those participants’ time and adds practice data you will only have to discard. If the answer should determine eligibility rather than routing, send non-qualifiers to a screenout instead of a label; and if the branch depends on performance rather than a single answer, gate on an accuracy aggregate instead.

typetitlecontentstimFormatstim1keyboardkeylabelifthenbutton1
instructionsWelcomeYou will sort words into animals and objects with the A and L keys.NEXT
testwordHave you done this task before? Press Y or N.y nymainblock
practicewordDOGa la
practicewordCHAIRa ll
practicewordSPOONa ll
testwordHORSEa lamainblock
testwordTABLEa ll
testwordCATa la

The question is an ordinary word trial: the text in stim1 is the stimulus, keyboard limits responses to y n, and the recorded response is the canonical key token, y or n. Its type of test means the answer is saved to results, so you keep a record of who skipped. The row has no key, so it stays unscored and leaves no trace in any later accuracy aggregate.

The branch is the if and then pair on that same row, evaluated after the trial completes. The condition is just y, the plain-value form: it is true when the response equals that text. This form is the right tool for text answers; a variable comparison such as %response%==y does not work, because the right-hand side of a %var% comparison is only ever read as a number and the condition fails silently. Keep %var% comparisons for numbers and match text with the plain form or has().

When the condition matches, then jumps to the row labelled mainblock, skipping the three practice rows; when it does not, no jump fires and the participant falls through into practice, which runs on into the main block naturally. Two label habits keep the jump reliable: a misspelled destination in then is silently treated as “no jump”, so the skip would just stop working with no error, and a purely numeric label can never be a target because numbers are read as row addresses first.

  • Reverse the polarity by branching on n in if, for example to skip a detailed tutorial for everyone except newcomers.
  • Fan out to more than two paths: ;-separated conditions in if pair with ;-separated destinations in then, and one extra destination at the end acts as the fallback for unmatched answers.
  • Decide the jump later, away from the question row, by labelling the question and branching on its recorded answer. Collect it with on-screen buttons (button1 Yes, button2 No) so the response is a number, then use %response[expq]%==1 in if, which works because the comparison is numeric.
  • Remove experienced participants from the study entirely by making the then destination end, or screenout when the project has screenouts configured.