CONCATENATE - combining answers through survey flow | XM Community
Skip to main content
Hi!



Has anyone tried to combine answers from different (open ended) fields into one data field, for reporting purposes?



In excel I would use "CONCATENATE" and I was wondering if this would work from survey flow as well.



The situation is, that for various reasons, we would have e.g. 3 fields of open ended (form) questions, that would need to be kept separate in the form. However, I would like to create a word cloud out of all of the responses. How can I concatenate the answers into one variable through survey flow? Or what would better serve this purpose?



The new, combined variable should be usable in Vocalize.
Hi Helena,

1. Create an embedded variable say "CombineText"

2. In values click on blue down arrow and select insert piped text and from the question from the list select the form entry option that you need.

3. !



4. Do this for all other option by appending the later options to first.

5. Your embedded variable will look something like this:

6. !

7. !
Nice! =CONCATENATE is such a useful formula for spreadsheets.
Thank you! This will be very helpful for us!
As a follow up to the thread above, I would like to concatenate two fields via survey flow for reporting purposes and add a comma and space between them. Right now the output appears as LastNameFirstName. I would like the output to read: LastName, FirstName.

What will happen is you eg. concatenate 3 fields but one of them is blank? eg. 3 Answers but the 2nd one is left blank. I suspect you'll get a double comma appearing? ie. Answer1,,Answer3. Is there something that can be done to replace the double comma ,, with just one comma? Might this be some JS code?

Thanks

Rod Pestell


Hi, Rod.
If you don't have a JS solution, a series of branches may be another option.
Using the CombinedText embedded field example from SaurabhPujare_Ugam's suggestion...

In your survey flow, create a branch with multiple IF criteria:
Answer 1 is not blank AND
Answer 2 is not blank AND
Answer 3 is not blank
Then CombinedText = Answer 1, Answer 2, Answer 3

Create another branch with the next combination of IF criteria:
Answer 1 is blank AND
Answer 2 is not blank AND
Answer 3 is not blank
Then CombinedText = Answer 2, Answer 3

Create another branch with the next combination of IF criteria:
Answer 2 is blank AND
Answer 1 is not blank AND
Answer 3 is not blank
Then CombinedText = Answer 1, Answer 3

Create another branch with the next combination of IF criteria:
Answer 3 is blank AND
Answer 1 is not blank AND
Answer 2 is not blank
Then CombinedText = Answer 1, Answer 2

Keep adding branches to address combinations of blanks or missing data.


Thanks brmckim, pretty complex if you have 20 options but it's a solution so thanks for the reply.


Hi there,

Is it possible to add the question text before each open-ended response in a concatenated field that combines a few open-ended responses?

It doesn't seem possible to include the question text in the delimiter field or to add it as part of fields 'a', 'b', or 'c'…

Is there any workaround?

Thanks in advance!

 


Leave a Reply