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

Get all Selected choices

  • Jan 8, 2019 7:40 PM UTC
  • 1 reply
  • 57 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.
View original

1 reply

fleb
Level 3 ●●●
Forum|alt.badge.img+6
  • Level 3 ●●●
  • Answer
  • Jan 8, 2019 9:17 PM UTC
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.