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.
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 documentation2. 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,
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?
@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.