Show the scoring summary but NOT at the end of survey. | XM Community
Skip to main content

Hi all,

 

I am designing an experiment where I have different 3 different sets of trivia questions with randomly selected questions. Each participant will answer one set of trivia questions. Once they take the quiz, I ask them other survey questions. I would like to display the scoring summary once they finish the trivia questions but before I ask the other survey questions. How do I go about doing this?

 

Thank you!

You can pipe the scores into a Text/Graphic question.


Thanks for your reply, TomG! 

I think piping is an option but here is where I am stuck. I am selecting questions at random from a pool of questions. Is there a way to get the order in which the questions were asked through piping? I want the questions and scores I display in the summary to be in the same order as was shown.

 


Thanks for your reply, TomG! 

I think piping is an option but here is where I am stuck. I am selecting questions at random from a pool of questions. Is there a way to get the order in which the questions were asked through piping? I want the questions and scores I display in the summary to be in the same order as was shown.

 

You could save the order of the questions in an embedded data field with JS. Then use JS to reorder the piped scores based on the saved order.


Thanks again, TomG.

I still figuring out things here. How can I save the order of the questions? I can create a embedded data variable. For each question displayed, I want to append the question ID to the variable. But the question is displayed at random through the randomizer. How can I store the question ID of the question selected by the randomizer?


Thanks again, TomG.

I still figuring out things here. How can I save the order of the questions? I can create a embedded data variable. For each question displayed, I want to append the question ID to the variable. But the question is displayed at random through the randomizer. How can I store the question ID of the question selected by the randomizer?

You would add the same JS to each question you want to record:

Qualtrics.SurveyEngine.addOnload(function() {
var qorder = "${e://Field/__js_qorder}";
if(qorder=="") Qualtrics.SurveyEngeine.setJSEmbeddedData("qorder",this.questionId);
else Qualtrics.SurveyEngeine.setJSEmbeddedData("qorder",qorder+","+this.questionId);
});

The above assumes the questions are on different pages.


This is great, thank you! I’ll give this a shot and get back. Much appreciated!


Hi TomG,

 

I am still not able to set the embedded data. Here’s what I have in one of the questions. I simplified this to test.

 

Qualtrics.SurveyEngine.addOnload(function()
{
    var qorder = "${e://Field/__js_qorder}";
    Qualtrics.SurveyEngine.setJSEmbeddedData("qorder","1")
    var new_qorder = "${e://Field/__js_qorder}";

    console.log(qorder);
    console.log(new_qorder);
    

});

 

The console still spits out <emptystring>

 

This is in my survey flow.

 

Any idea what I am missing?

 

Thank you!


A few things:

  1. Remove the quotes in the survey flow
  2. You can’t set an embedded data field and then pipe it on the same page. You can’t pipe it until the next page.
  3. If you want to check values in the console, do this:
Qualtrics.SurveyEngine.addOnload(function() {
var qorder = "${e://Field/__js_qorder}", neworder;
console.log("original",qorder);
if(qorder=="") neworder = this.questionId;
else neworder = qorder+","+this.questionId;
console.log("new",neworder);
Qualtrics.SurveyEngine.setJSEmbeddedData("qorder",neworder);
});

 


Thanks Tom, this worked great!