Skip to main content
Task Editor Variables View showing spreadsheet editor

Variables

Timeline variables let you create hundreds of unique trials from a single component template using a spreadsheet interface. Perfect for multi-trial experiments like Stroop tasks, memory studies, or any experiment where you need systematic stimulus variation across trials.

Overview

Timeline variables enable:
  • Trial-by-trial variation - Different stimuli, parameters, or settings each trial
  • Efficient experiment building - 160 trials from one template, not 160 components
  • Systematic control - Define exact trial parameters in spreadsheet
  • Data organization - Each row represents one trial with all parameters
  • Import/export - Work with CSV files and external tools
  • Randomization - Shuffle trial order automatically
When to use timeline variables:
  • Multi-trial experiments (20+ trials)
  • Systematic stimulus variation (different words/images each trial)
  • Counterbalancing conditions
  • Complex trial structures with many parameters
  • Any time you’d build the “same” component many times with slight variations

Timeline Variables Concept

The core idea: Each row = one trial.

How It Works

  1. Create a component template - Build one trial with variable placeholders
  2. Define variables in spreadsheet - Each row is one trial, columns are parameters
  3. Map columns to elements - Link spreadsheet columns to component properties
  4. Variables substitute automatically - System generates unique trial for each row
Example: Stroop Task Without variables:
  • Create 160 separate components manually
  • Each with different word, color, correct key
  • Time-consuming, error-prone, hard to modify
With variables:
  • Create 1 component template
  • Add 160 rows to variables spreadsheet
  • Each row specifies: word, color, congruency, correct key
  • System generates 160 trials automatically

Each Row = One Trial

The spreadsheet structure:
TrialWordColorCongruentCorrectKey
1REDredyesF
2BLUEyellownoJ
3GREENgreenyesF
160YELLOWbluenoJ
Result: 160 unique trials, each with specified parameters.

Columns = Trial Parameters

Each column represents one variable that changes across trials:
  • Stimulus content - Words, numbers, image filenames
  • Display properties - Colors, positions, sizes
  • Response configuration - Correct keys, feedback messages
  • Trial metadata - Condition labels, block numbers
  • Timing - Variable durations (if needed)

Variable Substitution in Components

Use ${columnName} syntax in component elements: Text element:
Content: "${word}"
Color: ${color}
Image element:
Image source: "${stimulus}.png"
Response configuration:
Correct response: ${correctKey}
At runtime:
  • Trial 1: ${word} → “RED”, ${color} → red, ${correctKey} → “F”
  • Trial 2: ${word} → “BLUE”, ${color} → yellow, ${correctKey} → “J”
  • And so on for each row in variables

Generating Many Trials from One Template

Single template component:
  • Add text element with ${word} as content
  • Set text color to ${color}
  • Configure valid keys: F, J
  • Set correct response to ${correctKey}
160 rows of variables:
  • Each row defines word, color, and correctKey
  • System creates 160 unique trials at runtime
  • All using the same template component
Benefit:
  • Change template once, affects all 160 trials
  • Add new trials by adding rows
  • Modify trial parameters by editing cells
  • Export/import for collaboration or reuse

When to Use Variables

Perfect Use Cases

Multi-trial cognitive tasks:
  • Stroop task (160 trials, varying word/color)
  • N-Back task (100 trials, varying stimuli)
  • Visual search (80 trials, varying target/distractor)
  • Recognition memory (200 trials, old/new items)
  • Lexical decision (300 trials, words/nonwords)
Systematic stimulus presentation:
  • Show each image from set exactly once
  • Counterbalance condition order
  • Present stimuli in predefined sequence
  • Vary stimulus parameters systematically
Complex trial structures:
  • Multiple parameters per trial (stimulus, condition, block, difficulty)
  • Trial-specific feedback messages
  • Variable timing across trials
  • Conditional correct responses

When NOT to Use Variables

Simple repetition:
  • Same stimulus 20 times → Use loop frame instead
  • No parameter variation → Variables unnecessary
Very few trials:
  • 5-10 trials → Faster to create separate components
  • Overhead of variables not worth it
Completely random stimuli:
  • If random selection from pool → Use per-stimulus frame
  • Variables better for systematic, controlled variation

The Variables Spreadsheet

The Variables view shows a spreadsheet-style editor for defining trial parameters.

Spreadsheet Interface

Features:
  • Rows - Scroll through thousands of trials
  • Columns - Add unlimited parameters
  • Cells - Click to edit individual values
  • Headers - Column names (variable names)
  • Row numbers - Trial indices (1, 2, 3…)
Virtual scrolling:
  • Handles 1000+ rows smoothly
  • Only renders visible cells for performance
  • Scroll with mouse wheel or keyboard arrows

Adding Rows (Trials)

Add single row:
  1. Click ”+ Add Row” button
  2. New trial row appears at bottom
  3. Fill in values for each column
Add multiple rows:
  1. Click ”+ Add Rows” button
  2. Specify number (e.g., 50)
  3. 50 blank rows added
  4. Fill in systematically or import
Insert row:
  • Right-click row number
  • Select “Insert Row Above/Below”
  • New blank row inserted at position
Tip: For large experiments, add all rows at once (e.g., 160 rows for Stroop), then fill in values.

Adding Columns (Parameters)

Add column:
  1. Click ”+ Add Column” button
  2. Enter column name (e.g., “word”, “color”, “correctKey”)
  3. Select column type (text, image, number, etc.)
  4. Column appears on right
Column naming:
  • Use descriptive names: “stimulus”, “condition”, “blockNumber”
  • No spaces (use camelCase or snake_case): “correctKey” or “correct_key”
  • Match exactly when using ${columnName} in components
Reorder columns:
  • Drag column header to new position
  • Useful for grouping related parameters
Delete column:
  • Right-click column header
  • Select “Delete Column”
  • Confirm deletion (can’t undo)

Editing Cells

Click to edit:
  1. Click cell
  2. Type new value
  3. Press Enter or Tab to save
  4. Or click outside cell
Keyboard navigation:
  • Tab - Move to next cell (right)
  • Shift+Tab - Move to previous cell (left)
  • Enter - Move down one row
  • Arrow keys - Navigate in any direction
Copy/paste within spreadsheet:
  • Copy cell: Cmd/Ctrl + C
  • Paste: Cmd/Ctrl + V
  • Copy range: Select multiple cells, copy, paste
Fill down:
  1. Select cell with value
  2. Drag fill handle (bottom-right corner) down
  3. Value copies to all cells in range
  4. Or select range and use “Fill Down” menu option

Column Types

Different data types for different parameters.

Text Columns

Plain text values for words, labels, conditions. Use cases:
  • Stimulus words (Stroop: “RED”, “BLUE”, “GREEN”)
  • Condition labels (“congruent”, “incongruent”)
  • Feedback messages (“Correct!”, “Try again”)
  • Participant instructions varying by trial
Example:
wordconditionfeedback
REDcongruentCorrect!
BLUEincongruentIncorrect, try again

Image Columns

References to image files in media library. Use cases:
  • Stimulus images (faces, objects, scenes)
  • Target and distractor images
  • Feedback icons (checkmark, X)
  • Variable backgrounds
How to fill:
  1. Click cell in image column
  2. “Select Image” button appears
  3. Choose from media library
  4. Filename fills cell automatically
Alternatively:
  • Type filename directly (e.g., “face_001.jpg”)
  • Must match exact filename in media library
  • Include file extension (.jpg, .png)
Substitution in components:
Image element source: "${faceImage}.png"
If cell value is “face_001”, loads “face_001.png” from media library.

Audio Columns

References to audio files. Use cases:
  • Spoken words
  • Tones or beeps
  • Music clips
  • Ambient sounds
Format: Same as image columns
  • Select from media library
  • Or type filename (e.g., “tone_440hz.mp3”)

Video Columns

References to video files. Use cases:
  • Video stimuli
  • Instructional clips
  • Dynamic scenes
Format: Same as image/audio columns

Number Columns

Numeric values for quantitative parameters. Use cases:
  • Difficulty levels (1, 2, 3)
  • Display durations in milliseconds
  • Target positions (X, Y coordinates)
  • Confidence ratings (1-7)
  • Reaction time thresholds
Example:
difficultydurationtargetXtargetY
12000400300
21500600450
Tip: Numbers can be used in calculations or conditional logic (advanced features).

Correct Response Columns

Special column type for defining correct answers. Use cases:
  • Correct keyboard key (“F”, “J”, “Space”)
  • Correct button choice (“Left”, “Right”)
  • Correct numeric answer (for math tasks)
  • Correct yes/no response
Example:
stimuluscorrectKeycorrectAnswer
dogFanimal
chairJfurniture
Mapping to response configuration: Component response settings can reference:
Correct response: ${correctKey}
System automatically scores participant response as correct/incorrect.

Adding Variables Step-by-Step

Complete workflow for setting up timeline variables.

Step 1: Open Variables View

  1. In Task Editor, click Variables in left sidebar
  2. Or press V keyboard shortcut
  3. Variables spreadsheet opens

Step 2: Add Columns for Trial Parameters

Think about what varies across trials: For Stroop task:
  • word (what word to display)
  • color (display color)
  • congruent (yes/no or congruent/incongruent)
  • correctKey (F or J)
Add columns:
  1. Click ”+ Add Column”
  2. Name: “word”, Type: Text
  3. Click ”+ Add Column”
  4. Name: “color”, Type: Text
  5. Click ”+ Add Column”
  6. Name: “congruent”, Type: Text
  7. Click ”+ Add Column”
  8. Name: “correctKey”, Type: Text

Step 3: Add Rows for Trials

  1. Click ”+ Add Rows”
  2. Enter number of trials (e.g., 160)
  3. 160 blank rows appear

Step 4: Fill in Trial Data

Option A: Manual entry
  • Click each cell and type value
  • Use Tab/Enter to navigate
  • Copy/paste for repeated values
Option B: Fill patterns
  • Enter first value
  • Drag fill handle to copy down
  • Useful for repeated blocks
Option C: Import from CSV
  • Prepare data in Excel/Google Sheets
  • Export as CSV
  • Import to Cajal (see Import section below)
Example filled data:
wordcolorcongruentcorrectKey
REDredyesF
REDyellownoJ
BLUEblueyesJ
BLUErednoF
…continuing for 160 rows

Step 5: Map Columns to Component Elements

Link spreadsheet columns to component properties:
  1. Switch to Screens view
  2. Select component to vary (e.g., stimulus component)
  3. Select element within component (e.g., text element showing word)
  4. In properties panel, find property to vary (e.g., text content)
  5. Click variable icon next to property
  6. Select column from dropdown (e.g., “word”)
  7. Property now shows ${word} instead of fixed value
Repeat for all variable properties:
  • Text element content → ${word}
  • Text element color → ${color}
  • Response configuration correct key → ${correctKey}

Step 6: Create Frame with Variables

  1. Switch to Flow view
  2. Select component(s) that use variables
  3. Right-click → “Create Frame”
  4. Select “Per-Trial Variables” frame type
  5. Frame created - component will repeat for each row in variables
Alternative: The frame may be created automatically when you add variables.

Step 7: Preview with Variables

  1. Start preview (press P)
  2. Set to preview subset (e.g., first 10 trials)
  3. Run through trials
  4. Verify each trial shows different values from variables
  5. Check substitution working correctly

Column Mapping

Connect spreadsheet columns to component properties.

Mapping Process

For text properties:
  1. Select text element
  2. Find “Text Content” in properties
  3. Click variable link icon
  4. Choose column (e.g., “word”)
  5. Property updates to ${word}
For image properties:
  1. Select image element
  2. Find “Image Source” in properties
  3. Click variable link icon
  4. Choose column (e.g., “stimulus”)
  5. Property updates to ${stimulus}
  6. System appends file extension automatically (if not in variable)
For response configuration:
  1. Select component (not element)
  2. Open response configuration section
  3. Find “Correct Response” field
  4. Click variable link icon
  5. Choose column (e.g., “correctKey”)
  6. Value updates to ${correctKey}

Using $ Syntax

Alternative to GUI mapping: type variable syntax directly. In text element:
"The word is ${word} and the color is ${color}"
In button label:
"Press ${correctKey} for ${condition}"
In feedback:
"You selected ${response}. Correct answer was ${correctKey}."
Rules:
  • Use exact column name (case-sensitive)
  • Wrap in ${} brackets
  • Can combine with literal text
  • Multiple variables in same property allowed

Mapping to Multiple Elements

One column can map to multiple elements. Example: Same stimulus in multiple locations
  • Header text: ”$
  • Center display: ”$
  • Footer reminder: “Remember: $
All three elements show same value each trial.

Multiple Columns in One Element

One element can use multiple variables. Example:
Text content: "${condition}: Press ${correctKey} if you see ${targetWord}"
Trial 1 values:
  • condition: “Congruent”
  • correctKey: “F”
  • targetWord: “RED”
Displays: “Congruent: Press F if you see RED”

Import and Export

Work with external spreadsheet tools for complex data preparation.

Importing CSV Data

Prepare trials in Excel or Google Sheets, import to Cajal. Prepare CSV file:
  1. Create spreadsheet with trial data
  2. First row = column names (variable names)
  3. Subsequent rows = trial data
  4. Save as CSV (comma-separated values)
CSV format example:
word,color,congruent,correctKey
RED,red,yes,F
RED,yellow,no,J
BLUE,blue,yes,J
BLUE,red,no,F
Import to Cajal:
  1. Variables view → Import button
  2. Select CSV file
  3. Map CSV columns to variable columns (if names don’t match exactly)
  4. Preview import
  5. Confirm - data fills spreadsheet
Benefit: Use spreadsheet formulas, scripting, or tools to generate complex trial lists.

Bulk Data Entry

For patterns or formulas:
  1. Generate data in Excel using formulas
  2. Example: Counterbalanced trial order
  3. Export as CSV
  4. Import to Cajal
Excel formula examples:
  • Randomize: =RAND() then sort by random column
  • Repeat pattern: =MOD(ROW()-2, 4)+1 for 1,2,3,4 repeating
  • Lookup: =VLOOKUP() to match stimulus to correct response

Exporting for Backup

Download variables for backup or sharing. Export steps:
  1. Variables view → Export button
  2. Choose format (CSV or Excel)
  3. Download file
  4. Store in version control or share with collaborators
Use cases:
  • Backup before major changes
  • Share trial list with co-authors
  • Document exact stimulus order
  • Recreate experiment elsewhere

Using Spreadsheet Software to Prepare Data

Advantages of Excel/Sheets:
  • Familiar interface
  • Advanced formulas and functions
  • Conditional formatting for QC
  • Scripts for automation (e.g., Python pandas)
  • Collaboration features (Google Sheets)
Workflow:
  1. Design trial structure in Excel
  2. Generate/randomize trials
  3. Add formulas for counterbalancing
  4. Quality check (conditional formatting to spot errors)
  5. Export as CSV
  6. Import to Cajal
Example: Counterbalanced Design
  • 4 conditions (A, B, C, D)
  • Each participant sees random order
  • Use Excel RAND() and SORT to create randomized lists
  • Export multiple CSV files (one per participant order)

Randomization

Shuffle trial order to prevent order effects.

Randomizing Trial Order

Enable randomization:
  1. Variables view → Randomization settings
  2. Toggle “Randomize trial order”
  3. Choose randomization method:
    • Complete randomization - Pure random shuffle
    • Block randomization - Randomize within blocks
    • Constrained randomization - Prevent certain orders
Effect:
  • Each participant sees trials in different order
  • Variables spreadsheet order is template, not actual presentation order
  • Prevents order effects, practice effects, fatigue confounds
Example: Spreadsheet order: Trial 1, 2, 3, 4, 5 Participant 1 sees: Trial 3, 1, 5, 2, 4 Participant 2 sees: Trial 2, 5, 1, 4, 3 Each participant different, all see all trials

Shuffling Rows

Randomize within the spreadsheet editor (for visualization or export). Shuffle button:
  1. Click “Shuffle Rows”
  2. Rows reorder randomly
  3. This changes template order (affects all participants unless per-participant randomization enabled)
Use case:
  • Create random order as default
  • Shuffle between pilot sessions
  • Generate randomized export
Note: Different from randomization setting which randomizes per participant at runtime.

Random Sampling

Present random subset of trials instead of all. Use cases:
  • 100 total stimuli, show 50 random each participant
  • Reduce experiment length
  • Vary difficulty by sampling easy vs. hard trials
Configure sampling:
  1. Variables view → Sampling settings
  2. Enable “Sample trials”
  3. Set sample size (e.g., 50 out of 100)
  4. Choose sampling method:
    • Without replacement - No repeats
    • With replacement - Trials can repeat
Example:
  • 200 word stimuli defined in variables
  • Sample 100 without replacement
  • Each participant sees 100 unique words (randomly selected from the 200)
  • Different participants see different subset

Sampling Options

Control which trials are presented.

Fixed Number of Trials

Sample specific number from total. Settings:
  • Total trials defined: 200
  • Sample size: 80
  • Each participant sees: 80 randomly selected
Use case: Large stimulus set, shorter experiment needed.

With vs. Without Replacement

Without replacement:
  • Each trial selected at most once
  • 80 samples from 200 = 80 unique trials
  • No repeats
With replacement:
  • Trials can be selected multiple times
  • 80 samples from 200 = 80 trials, some may repeat
  • Less common for cognitive tasks

Weighted Sampling

Assign probability weights to trials. Use case:
  • Show hard trials more frequently
  • Oversample rare conditions
  • Adaptive difficulty
How to configure:
  1. Add “weight” column to variables
  2. Assign weights (e.g., 1 for easy, 3 for hard)
  3. Enable weighted sampling
  4. Trials selected proportional to weights
Example:
trialdifficultyweight
1easy1
2hard3
Hard trial 3× more likely to be selected than easy trial.

Repetitions

Repeat entire variable set for multiple blocks.

Repeating Entire Variable Set

Use case:
  • Same 40 trials, repeat 4 times = 160 total trials (4 blocks)
  • Practice block followed by test blocks
Configure:
  1. Variables view → Repetitions setting
  2. Set repetition count (e.g., 4)
  3. 40 trials × 4 repetitions = 160 presentations
Order per repetition:
  • If randomization enabled: each repetition randomly ordered
  • If not randomized: same order each repetition
Example: Variables: 40 Stroop trials (10 per condition) Repetitions: 4 Result: 160 total trials (40 trials shown 4 times) Each block of 40 can be randomized independently

Multiple Blocks with Same Trials

Combined with randomization:
  • Repetition 1: Trials in order A
  • Repetition 2: Trials in order B (different random order)
  • Repetition 3: Trials in order C
  • Repetition 4: Trials in order D
Benefit: Practice effects distributed across all conditions

Block Intermissions

Insert break screens at regular intervals.

Purpose of Intermissions

Why add breaks:
  • Long experiments (160+ trials) cause fatigue
  • Eye strain from continuous focus
  • Maintain data quality
  • Participant welfare
  • Standard practice for long tasks
When to use:
  • Experiments >15 minutes
  • Attention-demanding tasks
  • High trial counts (>80 trials)

Configuring Intermissions

Settings:
  1. Variables view or Frame properties → Intermissions
  2. Enable “Block intermissions”
  3. Set interval (e.g., “Every 40 trials”)
  4. Choose intermission component:
    • Use existing break component
    • Or create new intermission screen
Example:
  • 160 total trials
  • Intermission every 40 trials
  • Breaks appear after trial 40, 80, 120
  • 4 blocks with 3 breaks

Rest Screens Every N Trials

Intermission content:
  • “Take a break”
  • “Press space when ready to continue”
  • Progress indicator: “40 out of 160 complete”
  • Optional timer: “Minimum 15 second break”
Creating intermission component:
  1. Add new Instruction component
  2. Add text: “Take a short break”
  3. Add text: “Press space to continue when ready”
  4. Optional: Add minimum view time (e.g., 15 seconds)

Attention Checks

Use intermissions for attention checks: Simple attention check:
  • “What color was the previous stimulus?”
  • Must answer correctly to continue
  • Detects inattentive participants
Intermission as attention check component:
  1. Create attention check question
  2. Mark as intermission component
  3. Insert every 30-50 trials
  4. Score and flag low-accuracy participants

Break Frequency Configuration

Recommendations:
  • Every 40-60 trials for standard tasks
  • Every 20-30 trials for demanding tasks
  • Every 80-100 trials for easy tasks
Factors:
  • Task difficulty
  • Trial duration (short trials = more frequent breaks)
  • Stimulus complexity
  • Participant population (children need more breaks)
Settings:
  • Fixed interval: Every N trials exactly
  • Time-based: Every X minutes
  • Adaptive: Based on performance decline

Common Variable Patterns

Stroop Task Example

Classic color-word Stroop with full trial specification. Columns:
wordcolorcongruentcorrectKeyblock
REDredyesF1
REDyellownoJ1
BLUEblueyesJ1
BLUErednoF1
GREENgreenyesF2
GREENbluenoJ2
YELLOWyellowyesJ2
YELLOWgreennoF2
160 rows total:
  • 40 congruent trials (word matches color)
  • 40 incongruent trials (word doesn’t match color)
  • 80 neutral trials (word doesn’t denote color)
  • Across 4 blocks
Component mapping:
  • Text element content: ${word}
  • Text element color: ${color}
  • Correct response: ${correctKey}

Memory Task Example

Recognition memory with old/new items. Columns:
stimulusconditionblockcorrectResponse
face_001.jpgoldstudy-
face_002.jpgoldstudy-
face_001.jpgoldtestyes
face_002.jpgoldtestyes
face_101.jpgnewtestno
face_102.jpgnewtestno
Study phase:
  • condition=“old”, block=“study”
  • No response required (just encoding)
Test phase:
  • condition=“old” or “new”, block=“test”
  • correctResponse: “yes” if old, “no” if new
Filtering:
  • Study phase: Show only rows where block=“study”
  • Test phase: Show only rows where block=“test”

Questionnaire Example

Survey with varying questions and scale types. Columns:
questionscalereverse_scoredcategory
How happy do you feel?1-7nomood
How sad do you feel?1-7yesmood
How anxious do you feel?1-7yesanxiety
How relaxed do you feel?1-7noanxiety
How energetic do you feel?1-5noarousal
Component mapping:
  • Text element: ${question}
  • Likert scale points: Vary based on ${scale} column
  • Scoring: Reverse if ${reverse_scored} = “yes”
Benefits:
  • Easy to add/remove questions
  • Export as CSV for scoring in R/Python
  • Randomize question order

Variable Substitution Details

How ${columnName} syntax works in different contexts.

In Text Elements

Simple substitution:
Text content: "${word}"
Displays the value from “word” column for current trial. Combined with literal text:
"Press ${correctKey} if the word is ${targetWord}"
Trial 1: “Press F if the word is RED” Trial 2: “Press J if the word is BLUE” Multiple variables:
"Trial ${trialNumber}: ${condition} condition"
Displays trial number and condition name.

In Image Elements

Image filename:
Image source: "${stimulus}.png"
If stimulus column = “face_001”, loads “face_001.png” Path with folder:
Image source: "faces/${stimulus}.jpg"
Loads from “faces/” subfolder in media library. Fallback if variable empty: Some systems support:
Image source: "${stimulus | default.png}"
Shows default.png if stimulus variable is empty.

In Feedback Messages

Dynamic feedback based on response:
Feedback text: "You pressed ${response}. The correct answer was ${correctKey}."
Conditional feedback: (If supported by advanced features)
If correct: "Correct! ${word} was the right answer."
If incorrect: "Incorrect. ${word} was not the correct answer."

Special Variables

Some variables are auto-generated: System variables:
  • ${trialNumber} - Current trial index (1, 2, 3…)
  • ${blockNumber} - Current block (if using blocks)
  • ${rt} - Reaction time from previous response
  • ${accuracy} - Running accuracy percentage
  • ${response} - Participant’s most recent response
Use in feedback or progress:
"Trial ${trialNumber} of 160 complete. Your accuracy so far: ${accuracy}%"

Advanced Features

Conditional Logic with Variables

Use variables to control branching. Example:
If ${difficulty} = "easy": Show easy trial
If ${difficulty} = "hard": Show hard trial
Access: Advanced component properties or conditional frames.

Computed Values

Define columns based on other columns. Example:
Column "congruent" computed from:
  If word = color: "yes"
  Else: "no"
Benefit: Define core parameters, derive others automatically.

Variable-Based Branching

Different experimental paths based on variable values. Example:
Block 1: ${blockType} = "practice"
  → Show feedback
Block 2: ${blockType} = "test"
  → No feedback
Configure once, variables control behavior.

Tips and Best Practices

Start with Small Test Set

Don’t create all 160 trials immediately:
  1. Design first 10 rows carefully
  2. Test with preview - verify substitution works
  3. Check all conditions represented
  4. Expand to full set only after testing
Benefit: Catch issues early before investing time in full dataset.

Use Descriptive Column Names

Good names:
  • stimulus, correctResponse, condition, blockNumber
Poor names:
  • col1, x, data, stuff
Why: When using ${columnName}, clear names make components self-documenting.

Check Variable Substitution in Preview

Always verify:
  1. Run preview with first 5-10 trials
  2. Check each trial shows expected values
  3. Verify images load correctly
  4. Confirm correct responses match stimuli
Common errors:
  • Typo in column name: ${correctkey} vs ${correctKey}
  • Missing images: filename doesn’t match media library
  • Wrong column mapped to property

Keep Backup of Variable Data

Before major changes:
  1. Export variables to CSV
  2. Save with version/date: stroop_variables_2024-11-27.csv
  3. Commit to version control (Git) if using
Why: Easy to accidentally overwrite cells, delete columns, or corrupt data.

Document Your Variable Scheme

Add README or notes:
  • What each column represents
  • Value coding (e.g., “F” = red, “J” = green)
  • Trial structure (blocks, conditions)
  • Counterbalancing scheme
Example notes:
STROOP VARIABLES
- word: Display word (RED, BLUE, GREEN, YELLOW)
- color: Text color (red, blue, green, yellow)
- congruent: yes (match) or no (mismatch)
- correctKey: F (red/green), J (blue/yellow)
- Trials 1-40: Block 1
- Trials 41-80: Block 2
...

Use Spreadsheet QC Techniques

Quality control in Excel:
  • Conditional formatting - Highlight errors (e.g., correctKey not F or J)
  • Data validation - Restrict values (dropdown: F, J only)
  • Formulas - Auto-compute derived values
  • Pivot tables - Check trial counts per condition
Catch errors before import:
  • Imbalanced conditions
  • Missing values
  • Typos in categories
  • Incorrect response mappings

Next Steps

Now that you understand timeline variables: Timeline variables transform the Task Editor into a powerful experimental design tool. Create hundreds of systematic trial variations efficiently, import complex trial structures, and maintain full experimental control - all through an intuitive spreadsheet interface.