Can anyone give me an example of how to write Constraint Statements on ODK Build.
I have a constraint that references back to another question. For example the first question is:
"How many people live in your household?"
I would like the second question to only be able to answer an integer less than or equal to the answer given in the above question.
Is this possible on Build?
Thanks
Nano
yanokwa
November 28, 2013, 3:01pm
2
Nano,
This is possible in Build. Under the Advanced section of the second
question (q2), add something like this
/data/q1 <= .
The constraint is that q1 (or rather the value at /data/q1) has to be
less than or equal to q2 (represented by the period) for the user to
proceed.
Yaw
ยทยทยท
--
Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.
On Sun, Nov 24, 2013 at 3:15 PM, nainita42@gmail.com wrote:
Can anyone give me an example of how to write Constraint Statements on ODK Build.
I have a constraint that references back to another question. For example the first question is:
"How many people live in your household?"
I would like the second question to only be able to answer an integer less than or equal to the answer given in the above question.
Is this possible on Build?
Thanks
Nano
--
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/groups/opt_out .
Hi, could you please clarify? If I understand the question, the correct constraint should be entered in q2 as follows constraint=/data/q1 >=. which means that the number of people living in the household (q1) should be greater than or equal to q2, am I right?
I have found other examples of syntax for ODK build that read like constraint=".<=/data/q1", so should we use "? Thanks,