I am making updates to a survey using xls forms. When I upload the spreadsheet it gives me the following error message: * TypeError: Cannot read property ‘previousElementSibling’ of undefined
I have put my spreadsheet through ODK - XLSForm Online v2.x (getodk.org) and if I go on Preview, I have no problem viewing it. However this is not the case in Kobo.
We are really desparate as we need to start field data collection in two days. Can you please help?
Welcome back to the community, @Nicole12! Would you mind sharing your xlsform with the community? If you feel it should be treated confidentially, you could share then through a private message.
Ok thanks. I have been on this for a while now. One other thing you may find useful to know: if I download a form of a project that has worked before and upload the spreadsheet again to create a duplicate version, I have exactly the same problem. So, in essence, somthing that has worked before is now giving me an errorr message. I hope you can help.
Hello @Nicole12,
I don’t know if this creates the problem. But your original xlsform had several invalid variable names. See $given_name column. These names have been automatically corrected by KoBoToolbox (see name column). But some references may now be wrong.
Kind regards
Hello @Nicole12,
Would you mind to provide the updated form version here?
A small additional hint: Some of your OTHER specify text variables are not filtered by selection before. (E.g. Part B “Who provided technical assistance to you?”)
You also have several invalid names in the choices, e.g. with blanks, ’ etc.
Hello,
I tried to drill down your form and could locate a problem. I added some note to follow what is happening at the calculates. Survival Drilled01.xlsx (26.1 KB)
It seems to be caused in the logic. The -1 at the end of the if clause creates a problem for the following calculate (with the choice label): The whole flow gets blocked. You can try by setting it to 1 instead and you will see, that things seem to work well.
The error you get (with -1) with Preview in KoBoToolbox.
Hi
Thanks so much @wroos for that detailed assessment.
@Nicole12 I find it interesting that this form had worked previously
When you download a form of a project that has worked before, are you able to show that project is working well even now i.e. without having to download the XLS form?
This will help us understand whether it is the downloading of XLS form that is changing the names.
This will help us dig into the root cause of introducing the problems that @wroos had identifed.
I had similar problem, what am doing saving the survey as draft first for offline collection and open the draft submission when internet is available, so when load the draft I had that problem appear. So what I did I disabled the choice_filter column to solve the problem and able load the draft survey to form and able now to submit.