Skip logic with multi-select questions and matrix

Hi, I’m trying to build a form to collect data on employees by age and gender, and wages (as well as wage type).

I would like to add some skip logic to the matrix at the bottom so that it would make available only the cells where the value in the matrix above >0 and the wage type has been selected. (e.g. if I have only a number of people recorded under Women - 16-24 and Men - 25+, with wage type being “per hour”, then I should only be able to input data on “wage per hour” and “average daily wage for those paid per hour” for Women - 16-24 and Men - 25+).

I’ve looked at a number of pages in the community so far and tried different combinations of skip logic, but since the question on wage type is multiselect, nothing is quite working yet as it should (and I haven’t tried doing the AND statement yet).

Would anyone have any idea of how to go about this?

Thanks!

Welcome to the community, @lauramaio! These support articles should help you solve your issue:

And this one too …

Hi @Kal_Lam

thanks for getting back to me - I had already gone through those pages (and at least 6 more, to be honest).

They just don’t address the combination of Matrix + Multiple select.

There is something in the syntax I’m not grasping yet (quite new to Kobo), and it’s not in those pages.

I’ve tried all that was outlined in the first link + the use of Selected($… etc.; I’ve also tried combinations of selected/not(selected) plus tried to bring in the “Wage type” question in the Matrix to see if the logic worked better (marginally).

At this point I’m seriously considering deploying the survey without skip logic, but it’s not ideal (as we know, that opens up to a lot of data entry error possibilities).

So, I tested bits of syntax in isolation and both halves work in themselves - however when I put them together with an AND statement, then I get an error message (so I’m clearly doing something wrong).
Statement 1 (works fine)
(${group_al1xf56_row_column} > 0 or ${group_al1xf56_row_column_1} > 0)

Statement 2 (works fine)
selected(${Type_of_wage}, ‘per_piece_work2’)

Statement 3 linking 1 AND 2, I get an error message
(${group_al1xf56_row_column} > 0 or ${group_al1xf56_row_column_1} > 0) and selected(${Type_of_wage}, ‘per_piece_work2’)

(The text of the error says
FormLogicError: Could not evaluate: ( /model/instance[1]/aEAVshTxYupcNo9xwswdiM/group_os7bj92/group_al1xf56_row/group_al1xf56_row_column = ‘’ or /model/instance[1]/aEAVshTxYupcNo9xwswdiM/group_os7bj92/group_al1xf56_row/group_al1xf56_row_column_1 =‘’) not(selected( /model/instance[1]/aEAVshTxYupcNo9xwswdiM/group_os7bj92/Type_of_wage , ‘per_piece_work2’)), message: Too many tokens.{“stack”:[{“t”:“root”,“tokens”:[{“t”:“bool”,“v”:true},{“t”:“bool”,“v”:true}]}],“cur”:{“v”:“”}})

Any idea on what would be the right way of constructing the statement?