Skip logic AFTER matrix question

Hello everyone, I am trying to find a way to add skip logic after a matrix question. I know how to add logic within the matrix but not how to do it after the matrix.

Let’s say I ask:
M. Do you want to do activity 1,2, 3 in the matrix. If they say yes to activity 3, I want to be able to ask follow-up questions (F1, F2, F3) . I added a question after the matrix but in the skip logic section of the follow-up question, the matrix question doesn’t appear and therefore nor do the response options. How to deal with this? Thanks a lot

Welcome to the community, @tiana_anjara! Could you show a pictorial description of how you intend to implement a skip logic to your matrix question? Maybe a dummy question should help us understand your issue pictorially.

Hello yes of course. ONLY If the persons responds YES to “Formation/transfert de compétences”, I would need question A6a and A6b to appear. How could I do this?

@tiana_anjara, you could do this by controlling the same through the skip logic. Could you share your XLSForm with the community? The community should be able to help you solve your issue. Maybe you should also be able to do the same by following the instructions outlined in the support article Adding Skip Logic.

Hello @Kal_Lam, thanks for your response. I haven’t figured out how to add skip logic after a matrix so any help would be great. I haven’t found any article/blog about this specifically either (only about standard skip logic, or logic within the matrix). Here is a screenshot of the following question that should only appear if the person ticked OUI in the matrix about Formation/Transfert de compétences. As you can see, the matrix and its answers do not appear in the skip logic options.

On the XLS form, the matrix is within the rows highlighted in yellow. The condition for the questions A6a and A6b (highlighted in blue) is for what is highlighted in green = OUI.

Thanks a lot for any help you may have time to provide!

Hello @Kal_Lam, thanks for your response. I haven’t figured out how to add skip logic after a matrix so any help would be great. I haven’t found any article/blog about this specifically either (only about standard skip logic, or logic within the matrix). Here is a screenshot of the following question that should only appear if the person ticked OUI in the matrix about Formation/Transfert de compétences. As you can see, the matrix and its answers (question A5A) do not appear in the skip logic options of question A6A and A6B.

As a new user I can’t upload attachments so pasting the screen shot here and code of the XLS form.

begin_group group_sm3mi02_row_3 w3
note group_sm3mi02_row_3_note ##### Investissement dans des entreprises/marché financier false w1
select_one cp8da50 group_sm3mi02_row_3_column row_3-Réponse false w1 horizontal-compact
text group_sm3mi02_row_3_column_1 row_3-Si oui, merci de préciser le projet; si non, pourquoi? false w1 no-label
end_group
begin_group group_sm3mi02_row_5 w3
note group_sm3mi02_row_5_note ##### Travail à Madagascar false w1
select_one cp8da50 group_sm3mi02_row_5_column row_5-Réponse false w1 horizontal-compact
text group_sm3mi02_row_5_column_1 row_5-Si oui, merci de préciser le projet; si non, pourquoi? false w1 no-label
end_group
begin_group group_sm3mi02_row_4 w3
note group_sm3mi02_row_4_note ##### Formation/transfert de compétences false w1
select_one cp8da50 group_sm3mi02_row_4_column row_4-Réponse false w1 horizontal-compact
text group_sm3mi02_row_4_column_1 row_4-Si oui, merci de préciser le projet; si non, pourquoi? false w1 no-label
end_group
begin_group group_sm3mi02_row_2 w3
note group_sm3mi02_row_2_note ##### Bénévolat dans des organisations à caractère caritatif, religieux etc false w1
select_one cp8da50 group_sm3mi02_row_2_column row_2-Réponse false w1 horizontal-compact
text group_sm3mi02_row_2_column_1 row_2-Si oui, merci de préciser le projet; si non, pourquoi? false w1 no-label
end_group
begin_group group_sm3mi02_row_1 w3
note group_sm3mi02_row_1_note ##### Dons à des associations/contributions philanthropiques false w1
select_one cp8da50 group_sm3mi02_row_1_column row_1-Réponse false w1 horizontal-compact
text group_sm3mi02_row_1_column_1 row_1-Si oui, merci de préciser le projet; si non, pourquoi? false w1 no-label
end_group
begin_group group_sm3mi02_row w3
note group_sm3mi02_row_note ##### Dons à des proches (argent ou nature) false w1
select_one cp8da50 group_sm3mi02_row_column row-Réponse false w1 horizontal-compact
text group_sm3mi02_row_column_1 row-Si oui, merci de préciser le projet; si non, pourquoi? false w1 no-label
end_group
text A5B_Si_vous_tes_in_montant_organisation A5B. Si vous êtes intéressé par d’autres types d’actions, merci de préciser votre la fréquence/montant/organisation false
select_multiple fl4io62 A6a_Quelle_s_forme_s_prendr A6a. Quelle(s) forme(s) prendraient ce partage de vos connaissances et compétences? false
text Merci_de_pr_ciser Merci de préciser false selected(${A6a_Quelle_s_forme_s_prendr}, ‘autre__pr_cisez’)
select_multiple qr13k20 A6b_Quelle_s_r_tribution_s_ A6b. Quelle(s) rétribution(s) attendriez-vous de votre partage (plusieurs réponses possibles)? false

Hi @tiana_anjara,

As you stated in here the skip logic from the formbuilder doesn’t see the questions from matrix. But it can be done via editing your xlsform in excel or google sheets OR manually entering your skiplogic in formbuilder. Can be seen in Adding Skip Logic — KoboToolbox documentation 2. Manually enter your skip logic in XLSForm code

First you need to know the labels of the answers of the question Formation/Transfert de compétences. In other words cp8da50 in your chocies worksheet.

Then you need to add following as your skip logic:

${group_sm3mi02_row_4_column} = ‘Oui’

NOTE: The first part is the label of your question. Which can be seen in the code you shared.
The second part (which is Oui in this case) needs to be changed according to the label of the Oui.

Hope this helps, if you have further questions I’ll try my best to help you.
Best,

1 Like

Great thanks a lot it works perfectly. Cheers

2 Likes

Hello, for some reason I am having the following issues:

  • the conditional questions A6a and A6b do not appear anymore, even though I haven’t changed the code since last week and checked the xls form, I used what you suggested and it worked last week
  • the layout keep on coming back to the default page even if I choose Grid every time I save it
  • the order of the response within the matrix has changed and is different in each matrix that follow each other, even though the row numbers are the same ex: donation to relatives is 1 but appears as the 4th or last option on the matrix
  • the matrix looks fine on laptop and tablet but is hard to read on a phone

Do you have any idea where this may come from/what to do?

Many thanks in advance

@tiana_anjara, maybe you will need to download your project as XLSForm and then look at it more closely on this. You should be able to see the skip logics more easily in an XLSForm. Note, there could also be other skips that has been triggered before it reached to A6a and A6b. Check out to see if there are any group skips that has affected this.

You need not worry on this. As long as you have deployed your project with the grid theme and you see then fall back to the default you will still be able to view your project in the grid theme layout. This is something KoboToolbox will improve in the near future.

We have a couple of issues being reported with this case. We do have a GitHub issue for this which we will address in the near future.

But as for now, you could download your project in XLSForm and then upload the same back to the server. That should fix the issue.

The matrix question uses the grid theme layout. This layout is best displayed with Enketo aka web forms. And, Enketo forms are best displayed with devices that has a large screen. PCs and tablets have large screen thus the forms are best displayed in these devices when compared with a smartphone with a small screen.

1 Like