Change of the “XML value” that affect the programmed calculations

Hi all.

The “XML Value” values ​​that are modified manually are changed by themselves generating errors in the calculations.

Example:

They are entered like this:

XML Value: 0
XML Value: 2
XML Value: 0
XML Value: 4
XML Value: 0

And Kobo modifies them like this:

XML Value: 0
XML Value: 2
XML Value: 0_1
XML Value: 4
XML Value: 0_2

What can I do to solve this problem?

Hi @braulioangulo,

Kindly please be informed that KoBoToolbox does not accept duplicate values for the name in the choices or what you have pointed out in the XML Value. If this happens, users should see the following error message as discussed in the post here:

or also like this one …

Thus, KoBoToolbox here is trying to solve your issue by automatically naming the XML Value with a unique name so that you do not get stuck while deploying your survey form.

Have a great day!

Hello Kal_Lam

What options do I have then to be able to do calculations with that question?

I only need that when doing the calculation the answers with choise “> 0” are taken into account, and if the answer choise is different then add “0”

Hi @braulioangulo,

Could you outline your calculation issue clearly so that we could figure out a solution if it’s doable in KoBoToolbox.

Have a great day!

Hello Kal_Lam

The question that has these options in each of its answers is part of a pharmacy part of a calculation programmed in the form

Response option 1 XML value: 0
Answer option 2 XML value: 2
Response option 3 XML value: 0_1
Answer option 4 XML value: 4
Response option 5 XML value: 0_2

If the answer option I choose is number 3 or number 5, the calculation will generate an error, but if I select option number 1, 2 or 4, the calculation will generate a correct result.

As the response options 1, 3 and 5 cannot have the same value of zero “0”, I need to know if there is another value that I can enter in the choices of those response options and that acts as zero “0” when doing the calculations …

I hope I have made myself understood …

Hi @braulioangulo,

Could you share your xlsform with the community (by simply keeping the calculation and the variable which holds the calculation)! It would be easy for the community to understand your issue.

Have a great day!