[ODK Community] Constraint in a repeat form

relevant = selected(${product}, 'rice')
constraint = (. >= 200) and (. <= 300)

··· On Wednesday, October 24, 2012, 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 <javascript:;>
Unsubscribe: opendatakit+unsubscribe@googlegroups.com <javascript:;>
Options: http://groups.google.com/group/opendatakit?hl=en