Using XLSForm,
I'm trying to constrain the upper and lower bounds of an integer.
I have tried:
20 <= . <= 200
This produces no error at conversion time, but the constraint doesn't work in the form. (The field accepts any value.)
. >= 20 and . <= 200
(. >= 20) and (. <= 200)
These both produce an error at conversion time:
org.javarosa.xform.parse.XFormParseException: bind for ${diastolic_bp} contains invalid constraint expression [. >= 20 and <= 200] Bad node: org.javarosa.xpath.parser.ast.ASTNodeAbstractExpr@7fbe847c
----
org.javarosa.xform.parse.XFormParseException: bind for ${diastolic_bp} contains invalid constraint expression [(. >= 20) and (<= 200)] Bad node: org.javarosa.xpath.parser.ast.ASTNodeAbstractExpr@7fbe847c
PS: I'm aware I could use a range widget for this purpose. But the form is just an example I'm working on for illustrating constraints. So it would be good to know why this isn't working.