Error when the term 'version (' appears in a character string

Hi,

when pulling data from a csv file I got the error message attached. This message only happened with this precise record and not with anyone else, before or after this record.

Investigating, I realised that this error is caused by an aberrant transformation of the term “version[space][(]” by Enketo into a sort of number followed by a time stamp. This term appeared in the context of a medical article referring to ‘seroconversion’.

The attached form reproduces the error.

It does not happen in Kobocollect, where the term ‘version (’ is not transformed and correctly handled in the context of a larger string of characters.

Is this a real bug?


problem_version_term_community.xlsx (12.1 KB)

@xbc, you could identify a lot of syntax issues by validating your XLSForm through this online validator.

Thanks for your response. Please, note that the online validator does not launch any error.

I have simplified the form here:
problem_version_term_community.xlsx (11.9 KB)

The behaviour described also affects calculate field.

If you are so kind to deploy the form and you also open the survey tab to see the contents not shown, you should be able to reproduce the error.

X

1 Like

Tested with the Online validator seems ok.

.

Could you explain more, please?
Hint: Normally “” is not used for default, please.

I think the problem might be the -, after a space, in a default expression (… -abc), without " ". Also, other mathematical signs, e.g. + or * result in the same error.
image

If you remove the - (minus) or the space before it seems fine.


(Trying to control the parsing through a - didn’t work.)

I don’t think it has something to do with the “version” word. You can test it by changing this pat (e.g. to seroconXXrsion …).

As workaround you could use calculation with once(“…”), instead of default. See
problem_version_02.xlsx (12.5 KB)

Here is a more reduced example showing the parsing problem.
image
problem_version_03.xlsx (12.1 KB)

Many thanks for your reply and your xlsx file.

I think there are two problems:

  1. using some characters in default, as reported for example here: Default with brackets gives deployment error. I only use default to illustrate the problem. I have also used calculate in your example as shown in the attached.
  2. the problem I am reporting has to do with the transformation of the string “version[(]” into a number followed by a time stamp or removing the text in the string. I attach your file modified and the error I get.


problem_version_04.xlsx (11.7 KB)

Note that my use of quotation marks it is just to avoid the problem of having brackets in the default text. Actually, the original problem was generated retrieving such string using pulldata (the text pulled had the string ‘achieving seroconversion (’. I use default text to simplify the explanation and code used in the community posts. Therefore, this problem is even more tricky because the error only shows when the pulldata is executed and not when the form is deployed.

X

Hi Kal_Lam,

I reported the ‘version’ term issue some days ago. There was no resolution from the responses received.
Should I report a bug using the bug report template? Is there any regulation in the community about when an issue can be reported as a potential bug?
Thanks for this.
Xavier

@xbc, could you kindly share with the community your final XLSForm (which you assume is clean) so that we can test it at our end before reporting a bug report. I assume it’s an issue with the XLSForm.