Embedded data not setting | XM Community
Question

Embedded data not setting


Badge +1

I created an embedded data variable "nbDUsers" and set it to -1 via the Survey Flow.
Then in the following block, first question, I do this:
Qualtrics.SurveyEngine.setEmbeddedData("nbDUsers", 100);
var myData = "${e://Field/nbDUsers}";
console.log("nbDUsers: "+myData);
Despite the the "setEmbeddedData", nbDUsers doesn't change the console log shows "nbDUsers: -1"
What am I doing wrong?


3 replies

Userlevel 7
Badge +22

The setEmbeddedData does not happen on the same page, you will see the effect on the following pages.

Badge +1

Sadly, it doesn't work on either... I do it in the "onUnload" of the previous block and it's not update in the next block :(

Userlevel 7
Badge +22

You will see it in next to next question.
Anyway, just put code in onPageslSubmit function. It will reflect in next block

Leave a Reply