Description
Some expressions create Load Error in Enketo Preview on Toolbox. The form opens, but the expression is no more working. This seems very new, since last Update.
Some recent posts in the KoBo forum seem to indicate the same problem.
But in XLSForm Online (ODK) it works well and doesn’t show an error. Also in Toolbox the form can still be deployed without error.
Steps to Reproduce
BUG_Test01.xlsx (24.2 KB)
-
Import XLS example
-
Preview >> Error
-
Test form behaviour >> Calculation not active
-
Deploy >> Ok
-
See XLS Remarks for more details (incl. syntax variants working
-
Import XLS into https://getodk.org/xlsform/ >> Ok
-
Preview Form there >> Works well.
Expected behavior
Expression evaluations work as expected and before.
Xmas Updates do not provide such essential side-effects (more robust testing before, please)…
Actual behavior
Some expressions are evaluated (parsed?) wrong. It happens with certain elements, like … != “” and … This BUG seems new after last release.
KoBoToolbox Preview
Works well in ODK XLSForm Online
Additional details
Current Enketo, Toolbox and ODK Online versions.
The BUG happens with some expression syntax in general: e.g. if (…) in calculation, expression in choice_filter and constraints .
In the example, we note which syntax creates the Error and which other syntax works well with KoBo Preview.
Two other examples, creating KoBo Preview (BUG) message
constraint:
count-selected(.) <= 2 and not(contains(${Nationality}, ‘-’)) and not( (selected(., ‘XXA’) or selected(., ‘908’)) and count-selected(.) != 1)
calculation;
if( (${FSLackFoodMonth} != “” or ${FSLackFood12MFreq} = 0) and ( count-selected(${ShockEvent}) > 0 or count-selected(${ShockCoping}) > 0 ), 1, 2 )
Feedback to the community seems urgent.
Beside Preview, It might also block viewing and editing of submitted data. Someone should test this soon, as this might even destroy collected data elements on edit on the server?
It’s urgent to know IF the Bug also touches view and EDIT of data!