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

Show the scoring summary but NOT at the end of survey.

  • August 6, 2025
  • 9 replies
  • 43 views

Forum|alt.badge.img+1

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!

Best answer by TomG

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);
});

 

9 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • August 6, 2025

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


Forum|alt.badge.img+1
  • Author
  • 5 replies
  • August 6, 2025

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.

 


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • August 6, 2025

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.


Forum|alt.badge.img+1
  • Author
  • 5 replies
  • August 6, 2025

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?


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • August 6, 2025

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.


Forum|alt.badge.img+1
  • Author
  • 5 replies
  • August 6, 2025

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


Forum|alt.badge.img+1
  • Author
  • 5 replies
  • August 6, 2025

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!


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • Answer
  • August 6, 2025

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);
});

 


Forum|alt.badge.img+1
  • Author
  • 5 replies
  • August 7, 2025

Thanks Tom, this worked great!