Constraint on pulled data not working

Hello ODK Community

I am pulling data (weights) for specific heights. Then I am trying to put a
constraint on the pulled data and a constraint message if the entered data
does not match the pulled data but it is not working. Basically the
constraint message shows no matter which data is entered.

I have attached the code for you to view.

Your help is greatly appreciated,

Best,
Ulises

Constraint.pdf (87.8 KB)

Ulises,

I haven't looked closely, but a few things to try.

Use outputs to make sure you are getting the data you think you are getting.

Also, when you use pulldata, the data you get back is text. You might
have to do some type conversions.
"... Even when they are numbers, data fields pulled from a .csv file
are considered to be text strings. Thus, you may sometimes need to use
the int() or number() functions to convert a pre-loaded field into
numeric form."
http://opendatakit.org/help/form-design/data-preloading/

Yaw

ยทยทยท -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Thu, Jun 12, 2014 at 5:45 AM, Ulises HM ulises.huerta.munoz@gmail.com wrote:

Hello ODK Community

I am pulling data (weights) for specific heights. Then I am trying to put a
constraint on the pulled data and a constraint message if the entered data
does not match the pulled data but it is not working. Basically the
constraint message shows no matter which data is entered.

I have attached the code for you to view.

Your help is greatly appreciated,

Best,
Ulises

--

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.

1 Like

Thank you Yaw.

I have tried with a simple note to verify that I am pulling the correct
data and it works but not with constraints or references.

I am using Ona and the num() or int() are not recognized. I am in touch
with them for support.

Thank you
Ulises

ยทยทยท On Thursday, June 12, 2014 5:20:18 PM UTC+2, Yaw Anokwa wrote: > > Ulises, > > I haven't looked closely, but a few things to try. > > Use outputs to make sure you are getting the data you think you are > getting. > > Also, when you use pulldata, the data you get back is text. You might > have to do some type conversions. > "... Even when they are numbers, data fields pulled from a .csv file > are considered to be text strings. Thus, you may sometimes need to use > the int() or number() functions to convert a pre-loaded field into > numeric form." > http://opendatakit.org/help/form-design/data-preloading/ > > Yaw > -- > Need ODK services? http://nafundi.com provides form design, server > setup, professional support, and software development for ODK. > > On Thu, Jun 12, 2014 at 5:45 AM, Ulises HM <ulises.hu...@gmail.com > wrote: > > Hello ODK Community > > > > I am pulling data (weights) for specific heights. Then I am trying to > put a > > constraint on the pulled data and a constraint message if the entered > data > > does not match the pulled data but it is not working. Basically the > > constraint message shows no matter which data is entered. > > > > I have attached the code for you to view. > > > > Your help is greatly appreciated, > > > > Best, > > Ulises > > > > -- > > -- > > Post: opend...@googlegroups.com > > Unsubscribe: opendatakit...@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...@googlegroups.com . > > For more options, visit https://groups.google.com/d/optout. >