Creating Variables
Variables in Labvanced are global to the study and can be created in four ways:
- Variables Tab: create variables in advance from the global variable list
- Task Editor Variables Panel: create a variable without leaving the editor
- Object Prompt: Labvanced prompts you automatically when adding a response-capturing object
- Event System: create and select a variable in one step while building event logic
Tip: Before building your study, write down the variables you need, what they should measure, and when they should be recorded. It is much easier to create variables with a clear plan than to add them incrementally as you go.
From the Variables Tab
The Variables tab gives you a global view of all variables in the study. To create a variable here:
- Open your study and navigate to the Variables tab in the left panel.
- Click the
+ New Variablebutton. - Give the variable a name, set the
Data Type, and configure any other properties. - Click
Save.
This is the best place to create variables in advance before you start building tasks, or to review and edit all variables in one place.
From the Task Editor Variables Panel
While working in the task editor, the Variables panel tab in the top-right corner lists all variables currently used on the selected frame. You can create a new variable directly from here without leaving the editor.
- Open a task in the task editor.
- Click the
Variablestab in the top-right panel. - Click
+ New Variable. - Name the variable and configure its properties.
When Adding an Object
Certain objects require a linked variable to store participant responses. When you add one of these objects to a frame, Labvanced automatically prompts you to name a variable. The variable is created and linked to the object in one step.
Objects that trigger this prompt include: input fields, checkboxes, sliders, dropdowns, Likert scales, and other questionnaire elements.
If the variable already exists, you can select it from the list instead of creating a new one.
From the Event System
When setting up an event action that involves a variable (such as Set / Record Variable), the Value Select Menu opens. Go to the New Variable tab, fill in the name and properties, and click Ok. The variable is created and immediately selected for the action.
This is the most common way to create variables when you are building event logic and realize you need a new one mid-flow.
Naming Variables
Variable names must be unique across the entire study. Two variables cannot share the same name. Use descriptive names that make clear what the variable measures and at what level, for example rt_image_click for a reaction time or correct_response for an accuracy flag.
Avoid periods (.) in variable names. Spaces and special characters may also cause issues: stick to letters, numbers, and underscores.
Further reading
Variable Properties
A full reference for every variable setting: data type, scale, format, start value, reset behavior, and recording options.
Time Series Variables
How to record continuous measurements like mouse position or physiological signals using the time series record type.
Working with Variables
The hub page for the working-with-variables section: types, properties, recording options, and data frames.