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?
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";
Hi @wakecarter,
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?
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.
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!