display logic based on combination of answers in matrix question | XM Community
Skip to main content
I have a question about the religion of each parent of the respondent. This matrix question uses drop down lists of many religions, and asks the respondent to choice one religion for each parent that is listed (each parent has a row, the drop down boxes are in the column).



If each parent has the same religion, I want to skip the respondent out of the next question. But how to gather the info that could be used in display logic to skip the respondent out if all of their parent/parent-figures are reported to have the same religion?



This becomes a little trickier because respondents will not all have the same number of parents/parent-figures. Some will have mother bio, father bio, step-father, etc. If they only have one parent, then there is not need to check to see if all parents are the same religion. Only parent figures that are selected in earlier questions are displayed in the matrix question (each has a row) that asks the respondent to pick a religion for each parent from a drop down box.



I thought I could simply count how many parents/parent figures the respondent selected in two earlier multiple response multiple choice questions. Then I thought that I would get the count on the number of parents who were reported as, say, Catholic, and skip the respondent out of the next question if the total number of parent figures equaled the total count of Catholics. But I can't seem to get that info together to create an embedded variable.



And maybe there are better ways to do this.



Thanks for considering.



--David
I was able to create an embedded field that held the total number of parent-figures selected the by respondent. This was used to define the embedded field, "ParNum":



$e{ q://QID1/SelectedChoicesCount + q://QID2/SelectedChoicesCount }



However, this is not really a "supported" way to pipe text (I simply added the "Count" to the "SelectedChoices"). But it does work.



So then setup a text entry question, and enter the ParNum embedded field as the default text entry response. Then use Java script to automatically forward to the next question (that way the respondent doesn't have to hit "next" on that screen).



From there the total number of parent-figures is available to use in the display logic of later questions. If that number equals the total number of selections of the religion, say, "Catholic", then I do not display the question about the religion in which the respondent was raised (or any other question that is not necessary if all parent figures had the same religion).



Clunky, but seems to work. Would be nice to have a better way, but this will work for now.
Hi DavidS,



Its a nice workaround!

Regarding the SelectedChoiceCount, our support page does have some information about it. You can refer it here: https://www.qualtrics.com/support/survey-platform/survey-module/editing-questions/piped-text/piped-text-overview/#PipingFromAPreviousQuestion



Also, if you want to avoid the JavaScript to auto-submit the question then you can follow the below steps:

- Move the dependent question (the question which will be based upon the condition) in an independent block

- In SurveyFlow capture both the counts in an embedded data.

- Add a Branch logic if both counts are not equal then ask the block (which have only one question)



Hope you got it...
I have a similar issue and the solution provided does not seem to work



> - Move the dependent question (the question which will be based upon the condition) in an independent block

> - In SurveyFlow capture both the counts in an embedded data.

> - Add a Branch logic if both counts are not equal then ask the block (which have only one question)



I have a form with 2 fields that asks respondents how many times they tried to do a task and how many times that task worked (I use RegEx validation to ensure I get a numeric response). I've setup 3 Embedded Data objects, one for each field, that are immediately below my parent question block. I then have my child question in a separate block below the Embedded Data objects. The child block has a simple comparison that checks if the number of times the task worked is less than the number of times they tried it. But, I'm not getting the display logic to trigger in my Preview. Any suggestions on how to address this?



Unfortunately, I need to send this survey out tomorrow, so I'm super pressed for time.

Leave a Reply