How do we execute a multi-punch question with a comma delimiter? | XM Community
Skip to main content

We have a couple of surveys with multi-punch responses and we are seeking an answer to the following question:
How would we send data for multi-punch questions to Dynamics with a comma delimiter?
Sample (fake) question:
What are your favorite animals? Select as many as applicable:

  • Dogs

  • Cats

  • Snakes

  • Guinea pigs

  • Other (includes text box for recording response)

Hi @echo,
this is actually easier than you might think:
in the survey flow simple set embedded data fields with the respective selectedChoices (gives back the text as comma-separated string (mind the comma is followed by a blank) and/or selectedChoicesRecodes(gives back a comma-separated string with the recodes of the answers(mind here the comma is also followed by a blank)

image.png
Please mind that you might run into problems with the text option if:

  1. you have multiple languages because the labels in the selected survey language will be written into the embedded data fields

  2. if the answer items have a comma in the text.


if you need to change the format of string you might need to add some java script to manipulate the form of the comma-delimited embedded data
Hope this helps, best regards
Rudi


Thank you!


Leave a Reply