Constraints not working?

Hi all

I am trying to build a form using Excel, which I am uploading onto ODK collect on Android tablet using Formhub.

None of the constraints I have entered into the spreadsheet are working once uploaded onto the tablet, and I have tried lots of different syntax here too.

Screen shot attached.

Any help much appreciated, I am a complete newbie!!

Lynsey

Lynsey, your form appears to be using a different syntax format meant for
XML. The constraints syntax for XLSforms is slightly different.

Instead of writing:

constraint=".<=2000 or . ='na'"

you simply write them directly in the cell like so:

.<=2000 or . ='na'

where you meant to have pt_dist_q1 to have a valid value of less than
2000 or 'na'.

There's a logic error in that though: pt_dist_q1 is a decimal type, and
will never have a value of 'na'.

Hope that helps.

··· On Saturday, January 11, 2014, wrote:

Hi all

I am trying to build a form using Excel, which I am uploading onto ODK
collect on Android tablet using Formhub.

None of the constraints I have entered into the spreadsheet are working
once uploaded onto the tablet, and I have tried lots of different syntax
here too.

Screen shot attached.

Any help much appreciated, I am a complete newbie!!

Lynsey

--

Post: opendatakit@googlegroups.com <javascript:;>
Unsubscribe: opendatakit+unsubscribe@googlegroups.com <javascript:;>
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 <javascript:;>.
For more options, visit https://groups.google.com/groups/opt_out.

--

Nik
Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop
me an email.

Thanks, I have got the constraints working now, but have come to a
different issue:

If an incorrect value is entered, the constraint message (and therefore
knowledge of the error) is only being presented to the enumerator once you
try to save the form. This isn't useful in a tree survey, as the surveyor
may have already moved 1000m through the forest only to have to go and
recheck their measurement....

Is there a way of changing this so that the enumerator is unable to
progress any further in the survey before entering data with correct
parameters?

Your help is appreciated! Thanks!

··· On Saturday, 11 January 2014 21:25:21 UTC+7, ニコノコ wrote: > > > Lynsey, your form appears to be using a different syntax format meant for > XML. The constraints syntax for XLSforms is slightly different. > > Instead of writing: > > constraint=".<=2000 or . ='na'" > > > you simply write them directly in the cell like so: > > .<=2000 or . ='na' > > where you meant to have *pt_dist_q1* to have a valid value of less than > 2000 or 'na'. > > There's a logic error in that though: *pt_dist_q1* is a decimal type, and > will never have a value of 'na'. > > Hope that helps. > > > On Saturday, January 11, 2014, wrote: > >> Hi all >> >> I am trying to build a form using Excel, which I am uploading onto ODK >> collect on Android tablet using Formhub. >> >> None of the constraints I have entered into the spreadsheet are working >> once uploaded onto the tablet, and I have tried lots of different syntax >> here too. >> >> Screen shot attached. >> >> Any help much appreciated, I am a complete newbie!! >> >> Lynsey >> >> -- >> -- >> 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. >> > > > -- > -- > Nik > Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop > me an email. > >

Hi Lynsey,

Is the question required?

Regards,

Mofya

··· From: opendatakit@googlegroups.com [mailto:opendatakit@googlegroups.com] On Behalf Of Lynsey Stafford Sent: 17 January 2014 10:46 AM To: opendatakit@googlegroups.com Subject: Re: [ODK Community] Constraints not working?

Thanks, I have got the constraints working now, but have come to a different issue:

If an incorrect value is entered, the constraint message (and therefore knowledge of the error) is only being presented to the enumerator once you try to save the form. This isn't useful in a tree survey, as the surveyor may have already moved 1000m through the forest only to have to go and recheck their measurement....

Is there a way of changing this so that the enumerator is unable to progress any further in the survey before entering data with correct parameters?

Your help is appreciated! Thanks!

On Saturday, 11 January 2014 21:25:21 UTC+7, ニコノコ wrote:

Lynsey, your form appears to be using a different syntax format meant for XML. The constraints syntax for XLSforms is slightly different.

Instead of writing:

constraint=".<=2000 or . ='na'"

you simply write them directly in the cell like so:

.<=2000 or . ='na'

where you meant to have pt_dist_q1 to have a valid value of less than 2000 or 'na'.

There's a logic error in that though: pt_dist_q1 is a decimal type, and will never have a value of 'na'.

Hope that helps.

On Saturday, January 11, 2014, wrote:

Hi all

I am trying to build a form using Excel, which I am uploading onto ODK collect on Android tablet using Formhub.

None of the constraints I have entered into the spreadsheet are working once uploaded onto the tablet, and I have tried lots of different syntax here too.

Screen shot attached.

Any help much appreciated, I am a complete newbie!!

Lynsey

--

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.

--

--
Nik
Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop me an email.

--

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.

For some reason, I am unable to view the form you attached.

Constraints should trigger immediately, along with custom
constraint_message, except where you set your page appearance to field-list.

Try to resend to form for reference.

··· On Friday, January 17, 2014, Lynsey Stafford wrote:

Thanks, I have got the constraints working now, but have come to a
different issue:

If an incorrect value is entered, the constraint message (and therefore
knowledge of the error) is only being presented to the enumerator once you
try to save the form. This isn't useful in a tree survey, as the surveyor
may have already moved 1000m through the forest only to have to go and
recheck their measurement....

Is there a way of changing this so that the enumerator is unable to
progress any further in the survey before entering data with correct
parameters?

Your help is appreciated! Thanks!

On Saturday, 11 January 2014 21:25:21 UTC+7, ニコノコ wrote:

Lynsey, your form appears to be using a different syntax format meant for
XML. The constraints syntax for XLSforms is slightly different.

Instead of writing:

constraint=".<=2000 or . ='na'"

you simply write them directly in the cell like so:

.<=2000 or . ='na'

where you meant to have pt_dist_q1 to have a valid value of less than
2000 or 'na'.

There's a logic error in that though: pt_dist_q1 is a decimal type,
and will never have a value of 'na'.

Hope that helps.

On Saturday, January 11, 2014, wrote:

Hi all

I am trying to build a form using Excel, which I am uploading onto ODK
collect on Android tablet using Formhub.

None of the constraints I have entered into the spreadsheet are working
once uploaded onto the tablet, and I have tried lots of different syntax
here too.

Screen shot attached.

Any help much appreciated, I am a complete newbie!!

Lynsey

--

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.

--

Nik
Need help customizing Survey Instruments/Tools/Forms for ODK Collect?
Drop me an email.

--
--
Post: opendatakit@googlegroups.com <javascript:_e({}, 'cvml',
'opendatakit@googlegroups.com');>
Unsubscribe: opendatakit+unsubscribe@googlegroups.com <javascript:_e({},
'cvml', 'opendatakit%2Bunsubscribe@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 <javascript:_e({},
'cvml', 'opendatakit%2Bunsubscribe@googlegroups.com');>.
For more options, visit https://groups.google.com/groups/opt_out.

--

Nik
Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop
me an email.

Yes.

Spreadsheet attached here, if it helps!

Thanks
Lynsey

DraftSPcepatV6.10.xlsx (15.7 KB)

··· On Friday, 17 January 2014 16:19:35 UTC+7, Mofya wrote: > > Hi Lynsey, > > > > Is the question required? > > > > Regards, > > > > Mofya > > > > *From:* opend...@googlegroups.com [mailto: > opend...@googlegroups.com ] *On Behalf Of *Lynsey Stafford > *Sent:* 17 January 2014 10:46 AM > *To:* opend...@googlegroups.com > *Subject:* Re: [ODK Community] Constraints not working? > > > > Thanks, I have got the constraints working now, but have come to a > different issue: > > > > If an incorrect value is entered, the constraint message (and therefore > knowledge of the error) is only being presented to the enumerator once you > try to save the form. This isn't useful in a tree survey, as the surveyor > may have already moved 1000m through the forest only to have to go and > recheck their measurement.... > > > > Is there a way of changing this so that the enumerator is unable to > progress any further in the survey before entering data with correct > parameters? > > > > Your help is appreciated! Thanks! > > > > > > > On Saturday, 11 January 2014 21:25:21 UTC+7, ニコノコ wrote: > > > > Lynsey, your form appears to be using a different syntax format meant for > XML. The constraints syntax for XLSforms is slightly different. > > > > Instead of writing: > > constraint=".<=2000 or . ='na'" > > > > you simply write them directly in the cell like so: > > .<=2000 or . ='na' > > > > where you meant to have *pt_dist_q1* to have a valid value of less than > 2000 or 'na'. > > > > There's a logic error in that though: *pt_dist_q1* is a decimal type, and > will never have a value of 'na'. > > > > Hope that helps. > > > > > On Saturday, January 11, 2014, wrote: > > Hi all > > I am trying to build a form using Excel, which I am uploading onto ODK > collect on Android tablet using Formhub. > > None of the constraints I have entered into the spreadsheet are working > once uploaded onto the tablet, and I have tried lots of different syntax > here too. > > Screen shot attached. > > Any help much appreciated, I am a complete newbie!! > > Lynsey > > -- > -- > 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/groups/opt_out. > > > > -- > > -- > Nik > Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop > me an email. > > > > -- > -- > 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/groups/opt_out. >

In 1.4, there is a new setting under General Settings that may be causing
this behavior:

Constraint processing behavior:

  • Validate upon forward swipe
  • Defer validation until finalized

Be sure the 'Validate upon forward swipe' is selected.

Mitch

··· On Fri, Jan 17, 2014 at 2:39 AM, ゴー・ニコライ wrote:

For some reason, I am unable to view the form you attached.

Constraints should trigger immediately, along with custom
constraint_message, except where you set your page appearance to field-list.

Try to resend to form for reference.

On Friday, January 17, 2014, Lynsey Stafford lynseyamy@gmail.com wrote:

Thanks, I have got the constraints working now, but have come to a
different issue:

If an incorrect value is entered, the constraint message (and therefore
knowledge of the error) is only being presented to the enumerator once you
try to save the form. This isn't useful in a tree survey, as the surveyor
may have already moved 1000m through the forest only to have to go and
recheck their measurement....

Is there a way of changing this so that the enumerator is unable to
progress any further in the survey before entering data with correct
parameters?

Your help is appreciated! Thanks!

On Saturday, 11 January 2014 21:25:21 UTC+7, ニコノコ wrote:

Lynsey, your form appears to be using a different syntax format meant
for XML. The constraints syntax for XLSforms is slightly different.

Instead of writing:

constraint=".<=2000 or . ='na'"

you simply write them directly in the cell like so:

.<=2000 or . ='na'

where you meant to have pt_dist_q1 to have a valid value of less than
2000 or 'na'.

There's a logic error in that though: pt_dist_q1 is a decimal type,
and will never have a value of 'na'.

Hope that helps.

On Saturday, January 11, 2014, wrote:

Hi all

I am trying to build a form using Excel, which I am uploading onto ODK
collect on Android tablet using Formhub.

None of the constraints I have entered into the spreadsheet are working
once uploaded onto the tablet, and I have tried lots of different syntax
here too.

Screen shot attached.

Any help much appreciated, I am a complete newbie!!

Lynsey

--

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.

--

Nik
Need help customizing Survey Instruments/Tools/Forms for ODK Collect?
Drop me an email.

--
--
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.

--

Nik
Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop
me an email.

--

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.

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

Hi,

What server are you using? The form works fine on Formhub.org.

Here is the link to the form: https://lesyq.enketo.formhub.org/webform

Mofya

··· From: opendatakit@googlegroups.com [mailto:opendatakit@googlegroups.com] On Behalf Of Lynsey Stafford Sent: 17 January 2014 11:25 AM To: opendatakit@googlegroups.com Subject: Re: [ODK Community] Constraints not working?

Yes.

Spreadsheet attached here, if it helps!

Thanks

Lynsey

On Friday, 17 January 2014 16:19:35 UTC+7, Mofya wrote:

Hi Lynsey,

Is the question required?

Regards,

Mofya

From: opend...@googlegroups.com <javascript:> [mailto:opend...@googlegroups.com <javascript:> ] On Behalf Of Lynsey Stafford
Sent: 17 January 2014 10:46 AM
To: opend...@googlegroups.com <javascript:>
Subject: Re: [ODK Community] Constraints not working?

Thanks, I have got the constraints working now, but have come to a different issue:

If an incorrect value is entered, the constraint message (and therefore knowledge of the error) is only being presented to the enumerator once you try to save the form. This isn't useful in a tree survey, as the surveyor may have already moved 1000m through the forest only to have to go and recheck their measurement....

Is there a way of changing this so that the enumerator is unable to progress any further in the survey before entering data with correct parameters?

Your help is appreciated! Thanks!

On Saturday, 11 January 2014 21:25:21 UTC+7, ニコノコ wrote:

Lynsey, your form appears to be using a different syntax format meant for XML. The constraints syntax for XLSforms is slightly different.

Instead of writing:

constraint=".<=2000 or . ='na'"

you simply write them directly in the cell like so:

.<=2000 or . ='na'

where you meant to have pt_dist_q1 to have a valid value of less than 2000 or 'na'.

There's a logic error in that though: pt_dist_q1 is a decimal type, and will never have a value of 'na'.

Hope that helps.

On Saturday, January 11, 2014, wrote:

Hi all

I am trying to build a form using Excel, which I am uploading onto ODK collect on Android tablet using Formhub.

None of the constraints I have entered into the spreadsheet are working once uploaded onto the tablet, and I have tried lots of different syntax here too.

Screen shot attached.

Any help much appreciated, I am a complete newbie!!

Lynsey

--

Post: opend...@googlegroups.com <javascript:>
Unsubscribe: opendatakit...@googlegroups.com <javascript:>
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 <javascript:> .
For more options, visit https://groups.google.com/groups/opt_out.

--

--
Nik
Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop me an email.

--

Post: opend...@googlegroups.com <javascript:>
Unsubscribe: opendatakit...@googlegroups.com <javascript:>
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 <javascript:> .
For more options, visit https://groups.google.com/groups/opt_out.

--

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.

This worked!

May this post serve as a warning to others - check the settings first or
you look pretty stupid :slight_smile:

··· On 18 January 2014 00:56, Mitch Sundt wrote:

In 1.4, there is a new setting under General Settings that may be causing
this behavior:

Constraint processing behavior:

  • Validate upon forward swipe
  • Defer validation until finalized

Be sure the 'Validate upon forward swipe' is selected.

Mitch

On Fri, Jan 17, 2014 at 2:39 AM, ゴー・ニコライ nikolai.go@gmail.com wrote:

For some reason, I am unable to view the form you attached.

Constraints should trigger immediately, along with custom
constraint_message, except where you set your page appearance to field-list.

Try to resend to form for reference.

On Friday, January 17, 2014, Lynsey Stafford lynseyamy@gmail.com wrote:

Thanks, I have got the constraints working now, but have come to a
different issue:

If an incorrect value is entered, the constraint message (and therefore
knowledge of the error) is only being presented to the enumerator once you
try to save the form. This isn't useful in a tree survey, as the surveyor
may have already moved 1000m through the forest only to have to go and
recheck their measurement....

Is there a way of changing this so that the enumerator is unable to
progress any further in the survey before entering data with correct
parameters?

Your help is appreciated! Thanks!

On Saturday, 11 January 2014 21:25:21 UTC+7, ニコノコ wrote:

Lynsey, your form appears to be using a different syntax format meant
for XML. The constraints syntax for XLSforms is slightly different.

Instead of writing:

constraint=".<=2000 or . ='na'"

you simply write them directly in the cell like so:

.<=2000 or . ='na'

where you meant to have pt_dist_q1 to have a valid value of less
than 2000 or 'na'.

There's a logic error in that though: pt_dist_q1 is a decimal type,
and will never have a value of 'na'.

Hope that helps.

On Saturday, January 11, 2014, wrote:

Hi all

I am trying to build a form using Excel, which I am uploading onto ODK
collect on Android tablet using Formhub.

None of the constraints I have entered into the spreadsheet are
working once uploaded onto the tablet, and I have tried lots of different
syntax here too.

Screen shot attached.

Any help much appreciated, I am a complete newbie!!

Lynsey

--

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.

--

Nik
Need help customizing Survey Instruments/Tools/Forms for ODK Collect?
Drop me an email.

--
--
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.

--

Nik
Need help customizing Survey Instruments/Tools/Forms for ODK Collect?
Drop me an email.

--

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.

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

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/i9aD89iXruA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

I'm using Formhub. Once uploaded onto a Samsung Galaxy Tab 2 with ODK
collect 1.4, the constraint errors only work at the end of the form, and
not during.

L

··· On Friday, 17 January 2014 16:40:14 UTC+7, Mofya wrote: > > Hi, > > > > What server are you using? The form works fine on Formhub.org. > > Here is the link to the form: https://lesyq.enketo.formhub.org/webform > > > > Mofya > > > > *From:* opend...@googlegroups.com [mailto: > opend...@googlegroups.com ] *On Behalf Of *Lynsey Stafford > *Sent:* 17 January 2014 11:25 AM > *To:* opend...@googlegroups.com > *Subject:* Re: [ODK Community] Constraints not working? > > > > Yes. > > > > Spreadsheet attached here, if it helps! > > > > Thanks > > Lynsey > > On Friday, 17 January 2014 16:19:35 UTC+7, Mofya wrote: > > Hi Lynsey, > > > > Is the question required? > > > > Regards, > > > > Mofya > > > > *From:* opend...@googlegroups.com [mailto:opend...@googlegroups.com] *On > Behalf Of *Lynsey Stafford > *Sent:* 17 January 2014 10:46 AM > *To:* opend...@googlegroups.com > *Subject:* Re: [ODK Community] Constraints not working? > > > > Thanks, I have got the constraints working now, but have come to a > different issue: > > > > If an incorrect value is entered, the constraint message (and therefore > knowledge of the error) is only being presented to the enumerator once you > try to save the form. This isn't useful in a tree survey, as the surveyor > may have already moved 1000m through the forest only to have to go and > recheck their measurement.... > > > > Is there a way of changing this so that the enumerator is unable to > progress any further in the survey before entering data with correct > parameters? > > > > Your help is appreciated! Thanks! > > > > > > > On Saturday, 11 January 2014 21:25:21 UTC+7, ニコノコ wrote: > > > > Lynsey, your form appears to be using a different syntax format meant for > XML. The constraints syntax for XLSforms is slightly different. > > > > Instead of writing: > > constraint=".<=2000 or . ='na'" > > > > you simply write them directly in the cell like so: > > .<=2000 or . ='na' > > > > where you meant to have *pt_dist_q1* to have a valid value of less than > 2000 or 'na'. > > > > There's a logic error in that though: *pt_dist_q1* is a decimal type, and > will never have a value of 'na'. > > > > Hope that helps. > > > > > On Saturday, January 11, 2014, wrote: > > Hi all > > I am trying to build a form using Excel, which I am uploading onto ODK > collect on Android tablet using Formhub. > > None of the constraints I have entered into the spreadsheet are working > once uploaded onto the tablet, and I have tried lots of different syntax > here too. > > Screen shot attached. > > Any help much appreciated, I am a complete newbie!! > > Lynsey > > -- > -- > 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/groups/opt_out. > > > > -- > > -- > Nik > Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop > me an email. > > > > -- > -- > 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/groups/opt_out. > > -- > -- > 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/groups/opt_out. >
1 Like

I have a form using Collect v1.15.0 and the constraint_message does NOT appear

I have the same form on Collect v1.14.2 on a different phone and the message does appear.

Hi @Jefferson_Francisco

thanks for reporting! Could you attach your form for verification? Recently I have discovered an issue wit constraint so it may be the same.

farm_follow_up.xlsx (16.1 KB)

Row 6

Everything works well for me. If in cows_in_production I add a number bigger than in cows_in_herd I see a toast: Vacas en producción debe ser menor que vacas en hato
I used v1.15.0

1 Like

I made sure that I am validating on forward swipe. Maybe it's my phone or something. :thinking: