Hi. No matter what I do I don’t get it right, even with the help of GPT…
I want to use the ${q://QID37/ChoiceGroup/SelectedChoices} ( it’s a matrix question/crousel).
I want to do the following:
if (scores.every(score => score >= 1 && score <= 3)) { trustScore = "Low";
if (scores.every(score => score >= 6 && score <= 7)) { trustScore = "High";
if it is neither only 6 or 7 in the choices or only 1 or 2 or 3 in the choices, then call trustScore = “Normal”.
Qualtrics.SurveyEngine.setEmbeddedData('Trust_Score', trustScore);
I need it of course as a hidden question…
any idea how I get it done? I don’t understand why anything I do, return Normal or not return at all… :
I guess it starts with:
Qualtrics.SurveyEngine.addOnReady(function () { var $this = jQuery(this.questionContainer); jQuery(".QuestionText", $this).hide();
Then I’m missing the part of Get… what should it be… Qualtrics.SurveyEngine.get??
and it should end:
// Set the result Qualtrics.SurveyEngine.setEmbeddedData('Trust_Score', trustScore); // Move to next question jQuery("#NextButton").click(); });
Thank you!