Hi there :)
After working on this for a couple of hours with no avail - I figured I'd ask!
I am looking to set the count (number of dragged responses) in a particular group (I have 3 total groups) as an embedded data variable.
Does anyone have any ideas?
Thanks in advance!
j
Set Count of Group as Embedded Data in PGR
Best answer by CamM
Hi Jmaca,
You need to add your embedded data variables (e.g. Group1Count, Group2Count, Group3Count) in the survey flow before the Pick, Group, Rank question.
Then you can add the following jQuery code to your Pick, Group, Rank question -:
Qualtrics.SurveyEngine.addOnPageSubmit(function(type)
{
var that = this;
if(type == "next")
{
Qualtrics.SurveyEngine.setEmbeddedData("Group1Count", jQuery("#" +that.questionId+"group0 li").length);
Qualtrics.SurveyEngine.setEmbeddedData("Group2Count", jQuery("#" +that.questionId+"group1 li").length);
Qualtrics.SurveyEngine.setEmbeddedData("Group3Count", jQuery("#" +that.questionId+"group2 li").length);
}
});
You will then be able to pipe/reference the embedded data variables as needed from the next page.
Credit really goes to rondev for this solution.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
