combine fields for email message? | XM Community
Skip to main content

I have a Form Field question with 4 fields in it. It asks the user to input the names of up to four people in these fields, so they can fill out all 4 or leave some (or all) blank. I would like to display the responses separated by commas (i.e. “Mary, John, Catherine”) in a confirmation email message that is sent upon submission. I tried piping in the “All Choices - Entered Text” option, but instead of leaving the empty fields empty, it input the field names (i.e. “Mary, John, Catherine, Name 4”). Is there a way to do this with an embedded field from javascript? Or something??? I know I can create a concat field with the Field Editor that works perfect for a dashboard, but that apparently isn’t available to pipe into email messages. Please help!

Hi,

You could create a field in the survey flow. Bellow the block with question, insert a new element, from the “embedded data” type. Name it, and as value insert the piped text of all four questions with the comma between the fields.

Please, let me know if you have any doubts.


@ABMeira But if there are empty fields, then there will be extra commas with nothing in between (i.e. “ , , , “ or “Mary, , ,”. I’d like to avoid that if possible.


You could assume that people are going to fill the fields in order and have multiple branches with the embedded data element bellow, and populate the embedded data only with the fields that are not empty : 

 

 


That’ll do. Thanks!


You’re welcome!


Leave a Reply