Autocoding Verbatim Responses | XM Community
Solved

Autocoding Verbatim Responses

  • 3 December 2017
  • 4 replies
  • 353 views

Userlevel 4
Badge +2
Does anyone have experience implementing autocoding for verbatim responses in Qualtrics (by auto coding, I mean giving the tool a list of acceptable verbatim answers that'll essentially automatically code verbatims into a hidden multi-choice question)?
icon

Best answer by mattyb513 11 July 2018, 17:47

View original

4 replies

Userlevel 7
Badge +7
This is definitely possible with some JavaScript. I'll see what I can work out soon!
Userlevel 1
Badge +3
Hi Rachel,
Not sure what you mean...but my gut is telling me I would solve this with a contact list. Do you want different "verbatims" to be unique based on the respondents? Do you want them to show as multiple choice options? Like in a drop down?
Userlevel 4
Badge +2
Thanks, @AnthonyR. I used to do a bit of python coding on the back end of my old tool for this, but wasn't sure if there was something already implemented/a known solve here yet.

@MartyK Nothing would be showing to the participants. It's more of a back-end bucketing thing... takes some of the work out of hand-coding responses, if that makes sense?
Userlevel 6
Badge +6
The attached gist will work for you if you are using a multiline or essay text box. Just add this javascript to the question. It will save the results in Embedded Data rather than a hidden question as that is best practice.

https://gist.github.com/mattbloomfield/fac63be414cbd4ed13839b2f62740cce

You will need to add your regex to the regex variable, as it is currently looking for 'my text string' or 'my other text string'.

Additionally, you would want to change the `fieldName` variable to whatever you were hoping to code. Obviously you could expand this for use with multiple terms.

The `.match()` function in javascript returns an array of matches, so you could even look through those and tag multiple embedded data fields instead of just one.

Leave a Reply