I am trying to connect Qualtrics with Pavlovia to collect some information about participants in Qualtrics and then direct them to the test in Pavlovia. However, I am having trouble passing embedded data from Qualtrics to a variable that then I can use in my PsychoJS experiment in Pavlovia.
I ma using the following URL to pass infomration form Qualtrics to Pavlovia.
The URL above correctly parse the embedded fields in Qualtrics because the URL gets correctly translated when the experiment in Pavlovia starts. Both variables (“participant” and “stimuliList”) are assigned a value in the URL (as you can see below).
However, only the variable for “participant” seems to be doing its job. Its information is correctly written in the CSV file of the experiment. However, I cannot use the variable “stimuliList”. Using it in the code below results in an error because the value of the variable is Undefined, when supposedly it has taken the value of “A” in the URL.
stimuliFile = "stimuli List " + stimuliList + ".xlsx";
I guess I am doing something wrong when retrieving the value of the variable. I have already spent 10 pavlovia credits trying to figure this out :S
Any ideas on how to make things work? And on how to test the integration between qualtrics/prolific and pavlovia without spending credits?
Have you added stimuliList to the expInfo dialogue box in PsychoPy?
If you turn off save incomplete data and add a final routine that never ends you can test without spending credits.
No, I didn’t. However, it turns our that I can access the variables passed from Quatrics with
expInfo as in the code below. I seems it is not needed to specify these variables within
expInfo in the PsychoPy code.
stimuliFile = "stimuli List " + expInfo['stimuliList'] + ".xlsx";
Thanks for the tip!
Do you know if the embedded variables being pased into pavlovia from qualtrics HAVE to be added to the expInfo dialogue box?
Could I embed them in the url and then call them using “expInfo[‘variable’]” without having them appear in the dialogue box at the begining?
Participants don’t see expInfo variables in the dialogue box if they have already been set in the URL.
Please could you test to see if a variable can be called by expInfo from the URL if it hasn’t been set in the dialogue box?
Ohh I see, I didn’t realise that, thanks!
I will test it out now to see if a variable from the URL can be called if it hasnt been set in the diaglogue box (I expect not)
Any variables that you pass from Qaultrics to Pavlovia through the URL will be available in the PsychoJS experiment. The only thing you need to do is use
expInfo as in the example that I provided above.
Great thanks for the info
When I ommited the variable from the experiment info dialogue box it caused an unidentified Java error. But now I realise that the participant cant see or edit this embedded data it isnt a problem to add the fields to the box!