Get all Selected choices | XM Community
Skip to main content
Solved

Get all Selected choices

  • January 8, 2019
  • 1 reply
  • 34 views

Forum|alt.badge.img+2
My survey is comprised of two blocks and each block has multiple questions. I am trying to collect all the responses in two separate arrays from each block. These arrays will later be used in another block. Since I am new to JS and Qualtrics, I am having trouble coding this. Any help will be appreciated.

Best answer by fleb

You can create the array using piped text. For example like this: `var myArray = ["${q://QID1/ChoiceGroup/SelectedChoices}", "${q://QID3/ChoiceGroup/SelectedChoices}", "${q://QID3/ChoiceGroup/SelectedChoices}"]` I would use single parentheses instead of double ones since I was not able to execute the code with double ones one time. However, I'm not able to post my answer with single parentheses in the code markdown.

1 reply

fleb
Level 3 ●●●
Forum|alt.badge.img+6
  • Level 3 ●●●
  • Answer
  • January 8, 2019
You can create the array using piped text. For example like this: `var myArray = ["${q://QID1/ChoiceGroup/SelectedChoices}", "${q://QID3/ChoiceGroup/SelectedChoices}", "${q://QID3/ChoiceGroup/SelectedChoices}"]` I would use single parentheses instead of double ones since I was not able to execute the code with double ones one time. However, I'm not able to post my answer with single parentheses in the code markdown.