Kobo–matrix_list conditional variable list

Hello everyone!

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.

thanks for your support.

Welcome @christian_silvera,
Did you try the relevant clause?

1 Like

Thanks @wroos

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.

Hello!

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.

thanks

@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.

Hello,
As you reference a multiple_select you need to use selected(…), see https://getodk.github.io/xforms-spec/#fn:selected.

Multiple selected choices are stored in a sring, separated by space. That is what you got now with ${variable1}.

2 Likes

Hi @christian_silvera @Kal_Lam
Is it possible to send the xls file with solutions?, have same requirements with issue that you raised

Maybe something similar., but for Collect, was discussed here already (found with the recommended search function of this forum).
https://community.kobotoolbox.org/t/alternative-of-question-matrix/1850

1 Like

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.

Many thanks!!