This setJSEmbeddedData does not update the EmbeddedData.
What am I doing wrong?
The embedded data is before the question and after each question there is a page break and a block.
Nothing updates the EmbeddedData?
Best answer by Tom_1842
On my end, jQuery does not need to be loaded into the header for Qualtrics.SurveyEngine.setJSEmbeddedData to work, but I agree it is good to include anyway for Simple layout.
I am not sure what might have changed about your setup so that the Embedded data field is not being set now, but make sure the Embedded Data field at the top of the survey flow has the prefix "__js_" and that this prefix is not included in Qualtrics.SurveyEngine.setJSEmbeddedData.
To get an Embedded Data field without the "__js_" prefix, you can create an Embedded Data field at the bottom of the Survey Flow without the prefix and then set the value with piping from "__js_" field, like in the below:
I believe this is currently only for surveys that use Simple layout. In the Survey Flow, if you have an Embedded Data field called "field", change this to be "__js_field". Then in the question's JavaScript, use
If you wanted to save this value to an Embedded Data field without the "__js_" prefix, you could create the field and set its values with piping at the end of the Survey Flow.
You should below library under look and feel header option. Also you should add __js_ before your embedded field name. your field name looks like “__js_field”.
On my end, jQuery does not need to be loaded into the header for Qualtrics.SurveyEngine.setJSEmbeddedData to work, but I agree it is good to include anyway for Simple layout.
I am not sure what might have changed about your setup so that the Embedded data field is not being set now, but make sure the Embedded Data field at the top of the survey flow has the prefix "__js_" and that this prefix is not included in Qualtrics.SurveyEngine.setJSEmbeddedData.
To get an Embedded Data field without the "__js_" prefix, you can create an Embedded Data field at the bottom of the Survey Flow without the prefix and then set the value with piping from "__js_" field, like in the below:
You will end up with 2 columns in the CSV - “__js_field” and also “field”. They will be identical except for the column headers. I think the “__js_” prefix will have to exist in the dataset, but you can select up to 100 columns to include in data exports if you wanted to configure CSV exports that did not include it.