Embedded data from multiple responses. | XM Community
Skip to main content
I am using a survey as an audit. Each question is yes or no but I have a text entry box to explain the reason the auditor choose "no". I want to pull all "no" responses into one embedded field. I have done that and it works great. The problem is I want to separate the responses with a ";". Unless all responses are no, I get a lot of erroneous ;;;;;'s because they are hard-coded. How do I have only one ; separator presuming there are only a couple of wrong answers? I know it's going to be simple but I cannot put my finger on it.
For yes you will get extra ;

You can add codes under condition like if yes set embedded variable as blank else set it as "; verbatim" and at last merge all embedded variables
Thank you. I already have my conditions set to the "no" text response like this: Question Error Comments = ${q://QID46/ChoiceTextEntryValue/4}; ${q://QID52/ChoiceTextEntryValue/3}; ${q://QID49/ChoiceTextEntryValue/2}; ${q://QID65/ChoiceTextEntryValue}; ${q://QID64/ChoiceTextEntryValue/3}; ${q://QID54/ChoiceTextEntryValue}; ${q://QID58/ChoiceTextEntryValue/2}; ${q://QID59/ChoiceTextEntryValue/2}; ${q://QID62/ChoiceTextEntryValue/3}; ${q://QID63/ChoiceTextEntryValue/3}; ${q://QID50/ChoiceTextEntryValue/3}

If I only have a text entry in QID62, I get 7 ;'s then the entry for QID62.
This will happen as respondent must have selected yes that is empty text response for these 7.



To avoid this add individual or text response to branch logic. If No than set it as like a=embedded text;

If Yes a=blank



In last merge all these embedded variables
@Denise ,



@bansalpeeyush29 is right, but you can also keep on cacatenating i.e updating the embedded data if no is selected. Create an embedded data(NoAnswer).



Make a branch logic if no is selected at Q4 then update the embedded data(NoAnswer) as `${e://Field/NoAnswer}; ${q://QID46/ChoiceTextEntryValue/4}` , now similarly for every other question and at end of all branch logic, you will get all no comments
Thank you both. So if I branch for each question where no is selected, the embedded data for each branch will look like this?



NoAnswer=${q://QID46/ChoiceTextEntryValue/4}



I've attached a screen shot of 2 questions, then bringing in all the "no" texts. I'm sure I'm missing something though on the merge piece.
For yes set it blank and make it as noanswer1, 2,3 and soon.



And in error text write all noanswer1;2,3....and so on
> @Denise said:

> Thank you both. So if I branch for each question where no is selected, the embedded data for each branch will look like this?

>

> NoAnswer=${q://QID46/ChoiceTextEntryValue/4}

>

> I've attached a screen shot of 2 questions, then bringing in all the "no" texts. I'm sure I'm missing something though on the merge piece.



Pipe in NoAnswer as:



NoAnswer=${e://Field/NoAnswer}; ${q://QID46/ChoiceTextEntryValue/4}
Think I've got it. Please confirm per attachment.
> @Denise said:

> Think I've got it. Please confirm per attachment.



Please replicate your survey as shown in the image!
That is so awesome. Worked perfectly! So sorry it took me so long to understand. I think I've just looked at for so long, though ceased to exist. I appreciate everyone's help!

Leave a Reply