I have a question about the kobo–matrix_list function. I would like the list of items that appear in my table below to be the options selected in the previous questions. For example, if you marked eggs, Milk, Potato, tomato, banana and apple, these items should appear in the table below to complete the price and quantity.
Yes, I have seen some examples of skip logics but they are too simple for what i need. I would like that in my matrix below only the items that the participant has marked in the previous questions appear.
I was able to make the options that are marked in the previous questions but when I mark more than one option, everything is filled in the same box. What I did was put ${variable1} in the labels column in the choices sheet.
@christian_silvera, the skipping for a select_one question and select_multiple questions are different. Maybe you will need to try it with the latter one. That should help you solve your issue.
Piggybacking as I have this exact problem!
Sorry, are you able to be more specific about the syntax that I need to use here? I have been reading and guessing for an hour now based on the thought that I needed to put “selected(${variable1})” in the labels column on the choices worksheet.
This just prints the equivalent of “selected(apio perejil papa cebolla)” as the label for a single row…
As an additional note, I am hoping to pull the choice labels here rather than names. I found some documentation relating to this, but wasn’t able to understand how to implement it in my case.
@BecSCS Getting back to you as I bumped into a similar situation and found a way to work with it, so hopefully it can be useful.
For example, you use select_multiple for varA, and want to refer what selected to the upcoming matrix, then I used those steps:
calculate selected options into a new variable, (in the survey tab) calculation = selected-at(${varA},(position(..)-1))
Call out the names of selected options into a new variable varA_selected (in the survey tab) calculation = jr:choice-name(selected-at(${varA},(position(…)-1)),‘${varA}’)
Use the names to refer in a matrix: (in survey tab) kobo--matrix_list = varA_selected, and (in choices tab) varA_selected label = ${varA_selected}