Multiple conditions related to an integer value

I am trying to design a form with branching based on an integer value.
Specifically, I have a question 'rand' that takes an integer value. If
that integer is between two values, I want to go to Q5a. If that integer
is between two different values, I want to go to Q5b. And so on.

I know you can combine conditions using "and", "or" and so forth, but I
can't seem to get it to actually work. I've tried all of the following:

((data('rand')>=1) and (data('rand')<=30))
(data('rand')>=1) and (data('rand')<=30) data('rand')>=1 and
data('rand')<=30
but all of them return the same error in xlsx converter. I get "Error:
missing ) in parenthetical interpretting formula: data('rand')=1 or
data('rand')=30 on sheet: survey row: 4 column: condition" no matter which
version I use.

I am sure this is a result of my noviceness, but I am hoping someone can
point out the error I'm making. Thanks!

For ODK 2.0 tools, we have abandoned XForms and javarosa in favor of
Javascript.

All formulas (constraints, etc.) should use Javascript syntax. In this case
'and' should be '&&'

We have added only a handful of functions:

https://opendatakit.org/use/2_0_tools/odk-application-designer-2-0-rev126/odk-xlsxconverter-2-0-rev126/#formulaFunctions

ยทยทยท On Wed, Jul 8, 2015 at 6:36 PM, wrote:

I am trying to design a form with branching based on an integer value.
Specifically, I have a question 'rand' that takes an integer value. If
that integer is between two values, I want to go to Q5a. If that
integer is between two different values, I want to go to Q5b. And so
on.

I know you can combine conditions using "and", "or" and so forth, but I
can't seem to get it to actually work. I've tried all of the following:

((data('rand')>=1) and (data('rand')<=30))
(data('rand')>=1) and (data('rand')<=30) data('rand')>=1 and
data('rand')<=30
but all of them return the same error in xlsx converter. I get "Error:
missing ) in parenthetical interpretting formula: data('rand')=1 or
data('rand')=30 on sheet: survey row: 4 column: condition" no matter which
version I use.

I am sure this is a result of my noviceness, but I am hoping someone can
point out the error I'm making. Thanks!

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com