Is there a way to export a written response to a Text Entry question as a count of listed items/word count?
For example, if my prompt was "list all of the vegetables that you like," and my respondent answered "carrots, broccoli, green beans, asparagus," I would want this to export as "4" instead of the list of vegetables.
I am still in the process of formulating the question, so I could instruct respondents to separate items with commas, periods, etc., if that would help at all. I plan to export to SPSS.
Solved
Exporting text entry responses as a count/number
Best answer by MadelineB
https://community.qualtrics.com/XMcommunity/discussion/comment/47772#Comment_47772Hi TomG,
Thank you so much! I moved .length to the line above and it worked.
Qualtrics.SurveyEngine.addOnPageSubmit(function() {
var veggies = jQuery("#"+this.questionId+" .InputText").val().split(",").length;
Qualtrics.SurveyEngine.setEmbeddedData("veggieCount",veggies);
});
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
