Constraint Issue

The form is asking time spend in each activity. So at the end of the group
I am calculating the total time, time remaining (fixed value - total time).
So if the remaining time is less than 0 I don't want the enumerator to go
forward but instead give an error message and correct the values so that
time remaining isn't less than 0. How should I use constraint in this ?

Please any help is really appreciated.

Thanks,
V

testing_women.xls (46 KB)

Hi Varun,

Add a constraint of "${time_remaining} >= 0" on the prompt where you
want to see that constraint. If that doesn't make sense, try the
simple example at http://xlsform.org/#constraints.

Yaw

··· On Fri, Nov 25, 2016 at 2:55 PM, Varun Kumar wrote: > The form is asking time spend in each activity. So at the end of the group I > am calculating the total time, time remaining (fixed value - total time). So > if the remaining time is less than 0 I don't want the enumerator to go > forward but instead give an error message and correct the values so that > time remaining isn't less than 0. How should I use constraint in this ? > > Please any help is really appreciated. > > Thanks, > V > > -- > -- > 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.

Hi Yaw,

Thanks for the reply.

I'm displaying the time_remaining with a note type variable when the group
ends (begin group -> input time -> end group -> calculate -> note type
display approach).
So should I add the constraint at the note type or calculate type. ?

I did add the constraint but still it allows me to go forward. PFA
screenshots of the form with constraints as displayed in the xls.

Please and help is really appreciated. I'm just a beginner.

Thanks,
Varun

testing_women.xls (53.5 KB)

··· On Saturday, 26 November 2016 12:34:16 UTC+5:30, Yaw Anokwa wrote: > > Hi Varun, > > Add a constraint of "${time_remaining} >= 0" on the prompt where you > want to see that constraint. If that doesn't make sense, try the > simple example at http://xlsform.org/#constraints. > > Yaw > > On Fri, Nov 25, 2016 at 2:55 PM, Varun Kumar <varunk...@gmail.com > wrote: > > The form is asking time spend in each activity. So at the end of the > group I > > am calculating the total time, time remaining (fixed value - total > time). So > > if the remaining time is less than 0 I don't want the enumerator to go > > forward but instead give an error message and correct the values so that > > time remaining isn't less than 0. How should I use constraint in this ? > > > > Please any help is really appreciated. > > > > Thanks, > > V > > > > -- > > -- > > 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. >

Varun,

Attached is an example.

Yaw

total_warning.xlsx (9.79 KB)

··· On Sat, Nov 26, 2016 at 10:05 AM, Varun Kumar wrote: > Hi Yaw, > > Thanks for the reply. > > I'm displaying the time_remaining with a note type variable when the group > ends (begin group -> input time -> end group -> calculate -> note type > display approach). > So should I add the constraint at the note type or calculate type. ? > > I did add the constraint but still it allows me to go forward. PFA > screenshots of the form with constraints as displayed in the xls. > > Please and help is really appreciated. I'm just a beginner. > > Thanks, > Varun > > On Saturday, 26 November 2016 12:34:16 UTC+5:30, Yaw Anokwa wrote: >> >> Hi Varun, >> >> Add a constraint of "${time_remaining} >= 0" on the prompt where you >> want to see that constraint. If that doesn't make sense, try the >> simple example at http://xlsform.org/#constraints. >> >> Yaw >> >> On Fri, Nov 25, 2016 at 2:55 PM, Varun Kumar wrote: >> > The form is asking time spend in each activity. So at the end of the >> > group I >> > am calculating the total time, time remaining (fixed value - total >> > time). So >> > if the remaining time is less than 0 I don't want the enumerator to go >> > forward but instead give an error message and correct the values so that >> > time remaining isn't less than 0. How should I use constraint in this ? >> > >> > Please any help is really appreciated. >> > >> > Thanks, >> > V >> > >> > -- >> > -- >> > 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. > > -- > -- > 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.

3 posts were split to a new topic: Can't put a constraint on the note nor on the calculate