Kobo–matrix_list conditional variable list

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

  1. calculate selected options into a new variable, (in the survey tab) calculation = selected-at(${varA},(position(..)-1))
  2. 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}’)
  3. 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}