1

At one point in my survey (using anonymous links), respondents are redirected out to an external website to complete a task, then redirected back to the survey upon completion:

Qualtrics.SurveyEngine.addOnload(function() {
   var taskStatus = "${e://Field/taskStatus}"
   if(taskStatus == "0") {
        var taskStatus = 1
        Qualtrics.SurveyEngine.setEmbeddedData("taskStatus",taskStatus);
        var targetURL="${e://Field/baseURL}"+"${e://Field/outURL}"
        window.location.replace(targetURL);
   } else {
        this.clickNextButton();
   }
});

For any browser in Windows, the redirect happens correctly. When the respondent is returned to the survey, ${e://Field/taskStatus} = 1 and they are sent to the next question.

For any browser in iOS/MacOS, the redirect happens correctly. When the respondent is returned to the survey, ${e://Field/taskStatus} = 0 and they are redirected back to the task.

How should I get ${e://Field/taskStatus} to consistently equal 1 upon return?

Dmitry S.
  • 1,544
  • 2
  • 13
  • 22
mmoore
  • 11
  • 3
  • Welcome. Please see [ask], then revise your post title to ask a clear, specific question. Don't just list a bunch of keywords, and don't add tags. :) – isherwood Nov 05 '21 at 19:23
  • The question really is, "Why it is working at all?" The embedded data field doesn't get stored in Qualtrics until you click the next button and the survey communicates with the Qualtrics server. So, it is surprising that this is working on any platform/browser. – T. Gibbons Nov 05 '21 at 21:34

0 Answers0