Community Groups are officially here!
We've released Groups, a new feature that enables us to connect community members of similar industries and interests in a shared, private space. You can check out all of the details here, including information about who can join, how to join, and what Groups are currently offered. Please leave your feedback through this Community Groups Feedback Survey.

Recording initial choices

liss_SK Germany Qubie ✭

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


  • JenCX
    JenCX Broomfield, CO Wizard ✭✭✭✭✭
    edited July 2019

    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".

  • MSobotta
    MSobotta Minnesota Sage ✭✭✭

    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.

  • liss_SK
    liss_SK Germany Qubie ✭

    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("#"+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){
            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);