How to efficiently make an embedded variable for piped text based on many questions. | XM Community
Skip to main content

Let’s say that I have ten items (Yes/No) associated with a characteristic, let's say it's A, B, C.... J. Something like this: 
item1 is A
item2 is B
item3 is C
...
item10 is J

I want to create an embedded variable considering the different possible combinations. That is if the participant said yes in item1 and no in the other 9, the embedded variable is stored with a text called "A". Another example, if the participant says item1, item3 and item10 is yes and the others no, then the text of the embedded variable is "A, C and J", so with all the possible combinations. How can I do this efficiently since there are hundreds of possible combinations?  
 

Hi @Josang,

 

Below is the solution:

 

1). Create those 10 separate question in separate blocks.

2). In survey flow, create 10 separate branching logic (If, Q1 = Yes, then add below embedded data Q1 with Value A), same below 2nd question, till 10th question (See image below)

3). After that, create 1 more embedded data say, “Final” with value = (${e://Field/Q1},${e://Field/Q2},${e://Field/Q3},${e://Field/Q4},${e://Field/Q5})

 

Note=> Update question numbers accordingly

 

 

Hope this helps :)

 

Regards,

PD


Thanks Patreek. Not sure how this solve my question buy I am very grateful that you answer it. Hope someone give me some efficient solution. Just to clarify, I want a embbeded variable to piped in another question that resume all potential combinations of differents items (4095 different combinations for 12 items) without do all by hand in survey flow. 

 

Hi @Josang,

 

Below is the solution:

 

1). Create those 10 separate question in separate blocks.

2). In survey flow, create 10 separate branching logic (If, Q1 = Yes, then add below embedded data Q1 with Value A), same below 2nd question, till 10th question (See image below)

3). After that, create 1 more embedded data say, “Final” with value = (${e://Field/Q1},${e://Field/Q2},${e://Field/Q3},${e://Field/Q4},${e://Field/Q5})

 

Note=> Update question numbers accordingly

 

 

Hope this helps :)

 

Regards,

PD

 


Leave a Reply