Hello! I am running into a problem with my data in some select one questions that depend on skip logic. For these questions, all participants who saw the questions are given a 1 instead of the answer choice that they selected. The issue is showing up both in the downloaded data and on KoboToolbox. The XLS form does have the correct answer choices connected to the question, so I’m not sure where the issue is coming up.
One example of a question with this issue is in row 50 of the XLS form, “b. How much input did you have in making decisions about staple grain farming and processing of the harvest?”
Hi thanks for your response! Yes, I have tried downloading with XML headers/labels, and with English and Nepali labels. All of them are resulting in 1s
After much digging, this issue seems to be caused by an error during data collection and not during data download. Our enumerators reported back that they got an error for the questions with skip logic while filling out the form, so the 1s represent the inability to fill in information rather than actual information.
The enumerators were using Kobocollect to fill out the forms. For the items behind skip logic, they would get the error “java.lang.Boolean cannot be cast to org.javarosa.core.model.data.helper.Selection.” Completing the form on the Enketo Web Form did not yield the same issue.
The problem seems to have been caused by the way skip logic for select_one questions was embedded in the XLSForm. The way that KoboToolbox translated the skip logic was by putting (for example) ${Did_you_yourself_participate_i_001} = ‘yes’ in both the relevant and the calculation columns. This led to an issue in the data types; I’m not exactly sure but I think ${Did_you_yourself_participate_i_001} might have returned a Boolean while the program was looking for a string (i.e., ‘yes’), which led to the error.
To fix this, I replaced the skip logic in the relevant column with selected(${Did_you_yourself_participate_i_001}, ‘yes’).Note that because selected() is a function that requires two arguments, you need to replace the equals sign with a comma. I also deleted the skip logic from the calculation column because it continued to lead to an error even with the new formula. I was also able to use not(selected(${Did_you_yourself_participate_i_001}, ‘no’)) to replace ${Did_you_yourself_participate_i_001} != ‘no’. This error was only coming up for skip logic using select_one type questions, skip logic using the select_multiple questions seemed to have correctly encoded with this selected() function in the XLSForm.
I could not figure out a way to change the skip logic in the Form Builder on the KoboToolbox website, I had to change the XLSForm and then upload it.
I highly recommend that anyone using skip logic based on select_one multiple choice questions and collecting data with Kobocollect edit the formulas before deploying.
hello! I am having a problem, when I download my data to excel there is complete column missing. I cant see on data-table as well but XLS form has everything. I am using Kobo collect.