Combine answers from multi-select question with '|' pipe symbol | XM Community
Skip to main content

Hi,

I’ve found somewhat similar posts, but not one exactly for what we need. And assuming the only way to do what we are looking for is via JavaScript. And that is a little outside of my knowledge span.

We have a survey with a multi-select question and we need the answers to go back into a field in a specific manner. The selected choice piped text doesn’t quite work with commas.

Ques:

  • Answer 1
  • Answer 2
  • Answer 3
  • Answer 4

If the associate picks multiple items we need the result field to show like: ‘Answer 1|Answer 2|Answer 3’. Thought about making an embedded data field in the flow but if there is an answer they don’t select we do not want a blank space or || to happen. Hope that makes sense.

 

Thanks! 

That is why you will have to apply a branch logic for each option and need to check if option 1 is selected only that it will pipe in embedded field else it will skip. with the help of this branch logic check you handle || issue. If your answer options are not containing commas then you can handle via JS easily.


i

Hi,

I’ve found somewhat similar posts, but not one exactly for what we need. And assuming the only way to do what we are looking for is via JavaScript. And that is a little outside of my knowledge span.

We have a survey with a multi-select question and we need the answers to go back into a field in a specific manner. The selected choice piped text doesn’t quite work with commas.

Ques:

  • Answer 1
  • Answer 2
  • Answer 3
  • Answer 4

If the associate picks multiple items we need the result field to show like: ‘Answer 1|Answer 2|Answer 3’. Thought about making an embedded data field in the flow but if there is an answer they don’t select we do not want a blank space or || to happen. Hope that makes sense.

 

Thanks! 

Hi,

 

There is a way to do this without JavaScript.  If you have a smaller number of options, you can use branch logic to set the embedded data like the way you need. 


Leave a Reply