Calculation works in Enketo but not with KoBoCollect

Hi dear Community

I have a problem in one of my form where one calculation works perfectly fine when using Enketo but not in KoBoCollect, without giving any error message.

First, there is one question where they have to enter the ID number (text question type), and part of that ID number is the date of birth. As such, I made some calculations to obtain the date of birth out of it (calculate question type). This part works fine both with KoBoCollect and Enketo as you can see on the screen shot attached.

If they don’t have an ID number, then appears a question where they have to enter the date of birth (date question type). An intermediary question defines which of both to use next.

Once I have the date of birth I have a second calculation for the age (calculate question type but same result with integer). Here is where I have a problem:

  • with the “date of birth” question answered (i.e. “ID number” not answered) age calculation works fine both with Enketo and KoBoCollect
  • with the “ID number” question, age calculation works fine in Enketo but not at all in KoBoCollect

Here is a screenshot of the Data once uploaded.

Here is the XLSForm Prueba_edad.xlsx (13.9 KB)

I don’t know if it has to do with the structure of the form, a missing element, concat error, syntax error, or if it’s a problem in KoBoCollect.

I have searched in the forum and elsewhere without success :smiling_face_with_tear:

I would highly appreciate your help

Best regards

@Vico, I just made a quick test with your XLSForm (loading and deploying it at my server) and could observe the following:

So is this the issue?

Hi @Kal_Lam
Yes, exactly.

And the problem is not so much not to have this calculation done in the downloaded data as I can easily obtain it with Excel Power Query. The problem is it is used later in the same form (under the form of: there are X adults and Y children) and thus gives misleading information to the person filling the form.

Hi @Kal_Lam

Any idea or suggestion on my issue?

Best regards

Hi @Kal_Lam

Any news on this?

We will soon start a new phase of data collection and would really appreciate to be able to solve this problem

Best regards