Save multiple rows in a custom JS question | XM Community
Skip to main content

Hi everyone and thank you for your amazing product.
I'm new at Qualtrics so it will be great to get your assistance.

I'm trying to save multiple rows in the same question.
for example, I got the following data set (in one custom js question)
{
"accuracy question 1" : 548,
"result question 1": true,
"accuracy question 2" : 740,
"result question 2": false,
}

I want to save those results.
I have created an embedded data variable for each question and I used Qualtrics.SurveyEngine.setEmbeddedData.
the results for each "survey answer" will be as follow:

responseId, accuracy question 1 , result question 1, accuracy question 2, result question 2
1 , 548 , true, 740, false
2, 895, false, 774, true
..

I want to save it as a long format (and not wide as above)
meaning like this:
responseId, questionId, accuracy, result
1, 1, 548, true
1, 2, 740, false
2, 1, 895, false
and so on..

Is there an API except Qualtrics.SurveyEngine.setEmbeddedData to save data? maybe is there a "force new response record" command?

It will be great to get your help ASAP

Thank you all in advance!!

Be the first to reply!

Leave a Reply