Formatting two different instances of piped text into bullet points | XM Community
Skip to main content

Hi all, 

I am making a survey regarding customer satisfaction. In one question we have asked individuals if they agree or disagree with the following statements - in a 5 point scale. 

 

As a follow-up question I want to ask the users to provide a text response as to why they strongly disagree/agree with the statements they selected. Additionally, I want to display in bullet point form the statements they selected under strongly disagree and/or disagree. I used the previous solution from https://gist.github.com/marketinview/94966779c804d74018bf62b31e87eaff to split the piped text into bullet points and merged them with a comma so it reads: 

 

You indicated that you do not agree with the following statements.

${q://QID7/ChoiceGroup/SelectedChoicesForAnswer/7}, ${q://QID7/ChoiceGroup/SelectedChoicesForAnswer/8}

Considering the score you gave, …. share any experiences that can be improved?

 

However if there are no choices selected for either one of the options I am left with a blank bullet point at the beginning or at the end of the list. 

 

So I was wondering - is there an easy way to merge both piped text strings so in the case that only one of them is selected I am not left with any blanks?  or is there another way to format it so 

 

 

 

 

 

Be the first to reply!

Leave a Reply