Recording initial choices | XM Community
Question

Recording initial choices


Userlevel 1
Hello, I am stuck with some output I need to generate. In my survey subjects can correct some answers after they get additional information. They see "Do you want to correct your choice? Yes, No" and get directed back to the question before, which is a Yes or No question too.
My problem is that I need to know for each person at each question if he changed his mind. So something like if he clicked Yes on the change question, record the initial choice and the final choice.

Do you have an idea how to incorporate that?
Thank you

3 replies

Userlevel 7
Badge +11
You could create an embedded data field and use branch logic to change it based on the answer to the correct choice question. Aka, if Correct Choice = No, "Initial", if Correct Choice = Yes, "Changed".
Userlevel 4
Badge +17
JenCX's would work, but in addition you could just ask another question and just preload their response with their previous answer. This would allow you to see what the first attempt was and then their second changed answer was. This would have some effect on your results, but it all depends on what you want to get out of the survey.
Userlevel 1
Thank you, found a way that might work. But the code is not right yet.
If they get asked if they want to change their answer and they say Yes, set correction=1 else nothing. If correction=1, the choice of the question before will become the "initial_choice".

The problem is that the first part of the first part does not work anymore, so if they click yes --> directed back to choice. No --> forwarded to next question.
And the ED correction and ED initial_choice do not show yet.


Qualtrics.SurveyEngine.addOnReady(function() {
var qobj = this;
jQuery("#Buttons").hide();
jQuery("#"+this.questionId+" input[choiceid=2]").click(function() { qobj.clickNextButton(); });
jQuery("#"+this.questionId+" input[choiceid=1]").click(function() { qobj.clickPreviousButton(); });
});

Qualtrics.SurveyEngine.addOnPageSubmit(function() {
var correction = [];
var selectedRecode = this.getChoiceRecodeValue(this.getSelectedChoices());
if (selectedRecode == 1){
(correction=1)};
Qualtrics.SurveyEngine.setEmbeddedData("Correction", correction);

var initial_choice = [];
var choice = "${e://Field/Choice}" ;
if (selectedRecode == 1){
(initial_choice = choice)
};
Qualtrics.SurveyEngine.setEmbeddedData("initial_choice", initial_choice);
});

Leave a Reply