
Sub Study Object
The Sub Study Object
can be used to embed other studies within a single experiment. Essentially, you have a ‘parent study’ that contains these ‘sub-studies’ which are other Labvanced studies.
Important Terminology: The ‘parent study’ houses the ‘sub study’ or ‘child study’ that is being linked / embedded into it.
There are several use cases for this object, such as incorporating standard questionnaires or pre-screeners without having to create them each time for a new study, comparing subjects’ performance across studies, establishing test batteries and more. By simply embedding a study, you can save time and streamline the experiment design and administration process.
Let’s discuss how work with the Sub Study Object
and if you have any questions, please contact us!
Properties of the Sub Study Object
The Sub Study Object
can be added to the parent study via the Objects side menu. Then, using the Object Properties
panel on the right, you can control the functionality of the Sub Study Object
.
Exp_id in the Study Object
To embed a specific study, simply select the Sub Study Object
and then scroll down the Object Properties
panel. At the bottom, under the ‘Substudy’ heading, you will find a field for Exp_id
, this will automatically be populated based on the study you select upon opening the Folder icon. This numeric value there indicates the experiment ID.
In the example below, the Exp_id
is equal to 67935.
Linked Variables in the Sub Study Object
Upon embedding the sub study into the parent study, you can link or ‘call on’ variables from that study into the current study by clicking on the Link variables +
green icon.
A list of available variables will appear to select from. Upon selecting it, the variable will be added automatically to the table of ‘LINKED VARIABLES’ table as shown below:
The Rec_Session_Id
variable refers to the recording session ID and this is automatically displayed in order to match the IDs between the sessions of the parent study and the sub study.
Query Parameters
In the substudy, to receive static values from the parent study, you can use the Query Parameters.
In the parent study, with the Sub Study Object
selected, scroll down the Object Properties
to the Query Parameters
field.
In the example below we create two parameters as defined by the &name=value string,
&participation_study
= this parameter was given the value ‘questionnaireB’&participation_points
= this parameter was given the value ‘15’
IMPORTANT Notes on working with query parameters:
- While a parameter name is something you create and assign, but it must be consistent across studies.
- The values that you assign after the parameter name are also static, meaning that you can only assignment once in the parent study.
- These values are added to the URL automatically and are not visible to the participant.
In order for the Sub Study to receive and store these values, events must be used, as described in the next section.
Events for URL Parameters
Going into the Sub Study itself, ie. the child study, you can create an event to read the static value that was stored and communicated with via the URL parameter sent from the parent study.
First, you specify a trigger to initiate this process. Then you must create an action in order to store the value in a variable:
Variable Actions
→Get URL Parameter
- In the action, you can now specify:
Parameter Name
Save in Variable
In the example below we created two variables in order to store the URL query parameters:
Again, please note that the Parameter Name
is written exactly as it is in the parent study. On the other hand, the Save in Variable
can be any name you wish to give it.
Additional Options
Additional options are available at the bottom of Object Properties
panel for how the Sub Study Object
should behave:
Autoload during Trial Initialization
This option specified the Sub Study to automatically load during Trial Initialization. If you don’t want the Sub Study to load automatically, simply uncheck this option and then use events to specify when it should load and how the object should behave.
Show Sub Study Controls
The Sub Study Controls
essentially refer to the control buttons that are present in the bottom left corner of the object, such as the ‘reload’ button.
Data and Recordings from the Sub Study Object
The data collected during the experiment will be shown within each of the respective sub-study’s Data View & Export Tab.