Solved
E-mail Trigger Formatting: Replacing Comma with Line Break
I have an e-mail trigger in which part of the piped text are multiple selections that have been chosen. In the e-mail, the selections appear straight across the screen, separated by commas. This is unattractive, and I would like for each of the selections to appear on a new line. How can I do this?
Best answer by TomG
Replace the commas with breaks and save to an embedded variable. Then pipe the embedded variable into your email trigger.
```
Qualtrics.SurveyEngine.setEmbeddedData("myVar", "${q://QID1/ChoiceGroup/SelectedChoices}".replace(/, /g, "<br>"));
```
View originalLeave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.