[ODK Community] Constraint in a repeat form

I would recommend instead having a form that began with a multi-select to
choose which foods you are pricing, then use those choices to make the "how
much did food X cost?" questions visible. No need for repeats, and each
food prompt can apply the needed range constraints.

Mitch

··· On Tue, Oct 23, 2012 at 5:58 PM, wrote:

I'm using a repeat to collect food prices but every product has his own
constraint. For example the price of rice must be between 200 and 300; the
price of maize between 100 and 200; the price of vegetable oil between 600
and 800.
I need to write a constraint in my repeat form like "if product = rice
then .>=200 and . <= 300".

Thanks for your best suggestions and advice.

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

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

visible == relevant

··· On Tue, Oct 23, 2012 at 6:51 PM, Mitch S wrote:

I would recommend instead having a form that began with a multi-select to
choose which foods you are pricing, then use those choices to make the "how
much did food X cost?" questions visible. No need for repeats, and each
food prompt can apply the needed range constraints.

Mitch

On Tue, Oct 23, 2012 at 5:58 PM, atchezi@gmail.com wrote:

I'm using a repeat to collect food prices but every product has his own
constraint. For example the price of rice must be between 200 and 300; the
price of maize between 100 and 200; the price of vegetable oil between 600
and 800.
I need to write a constraint in my repeat form like "if product = rice
then .>=200 and . <= 300".

Thanks for your best suggestions and advice.

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

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

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