How to incorporate a dummy variable while writing a survey? | XM Community
Skip to main content
Hi Community,



I am writing my survey. I have to incorporate two dummy variable, which go like this:

If Question 2 = A or Question 3 = B, C then dummy variable 1

If Question 2 = B or Question 3 = A, then dummy variable 2



These two dummy variables will then be used in later questions.



How do I add these dummy variables while I am writing the survey?



Please note: I haven't started collecting responses yet, so I have no responses for my survey.



Thanks,

Ank
Unless I am oversimplifying your question, this can be done by using a branch and embedded data field in the survey flow. Branch states question answers (e.g. Q1 A is selected OR Q3 B is selected) then embedded data field is "dummy1" = 1. then create a branch and em data set for dummy2
@Libertywick, thanks. I followed the steps and added the branch and embedded data. Now how do I check if this works? Thanks.
@ank you can add a block with your variables to see if they are being assigned correctly like so...

(the second image is in html view)

!

!
@Libertywic, thanks. In the Survey Flow I created a Branch logic followed by an Embedded data before the block began.



And before the question itself, I added a display logic, with

1. Embedded Data--> 2. Field name (as Dummy1, which I had also added as Embedded data on top of Survey Flow)--> 3. is Equal to--> 4. Values : Here I wrote ${e://Field/dummy1}.



This is working. Thanks again. Please confirm if the above mentioned steps that I have done to create dummy variable is correct.



Thanks,

Ank
To check what the value of your variables are, you can add a debug screen like so: !
Thanks @Libertywick .

Leave a Reply