Skip on response
Ask one question and jump participants who answer yes straight past the practice block.
When to use it
Section titled “When to use it”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.
Trial file
Section titled “Trial file”| type | title | content | stimFormat | stim1 | keyboard | key | label | if | then | button1 |
|---|---|---|---|---|---|---|---|---|---|---|
| instructions | Welcome | You will sort words into animals and objects with the A and L keys. | NEXT | |||||||
| test | word | Have you done this task before? Press Y or N. | y n | y | mainblock | |||||
| practice | word | DOG | a l | a | ||||||
| practice | word | CHAIR | a l | l | ||||||
| practice | word | SPOON | a l | l | ||||||
| test | word | HORSE | a l | a | mainblock | |||||
| test | word | TABLE | a l | l | ||||||
| test | word | CAT | a l | a |
type,title,content,stimFormat,stim1,keyboard,key,label,if,then,button1 instructions,Welcome,You will sort words into animals and objects with the A and L keys.,,,,,,,,NEXT test,,,word,Have you done this task before? Press Y or N.,y n,,,y,mainblock, practice,,,word,DOG,a l,a,,,, practice,,,word,CHAIR,a l,l,,,, practice,,,word,SPOON,a l,l,,,, test,,,word,HORSE,a l,a,mainblock,,, test,,,word,TABLE,a l,l,,,, test,,,word,CAT,a l,a,,,,
How it works
Section titled “How it works”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.
Variations
Section titled “Variations”- Reverse the polarity by branching on
ninif, for example to skip a detailed tutorial for everyone except newcomers. - Fan out to more than two paths:
;-separated conditions inifpair with;-separated destinations inthen, 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 (
button1Yes,button2No) so the response is a number, then use%response[expq]%==1inif, which works because the comparison is numeric. - Remove experienced participants from the study entirely by making the
thendestinationend, orscreenoutwhen the project has screenouts configured.