How to make calculation field to show in constraint_message?

Dear all,

I did as below:

type name label calculation constraint
constraint_message

··· -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- begin group baseline_toilet Baseline of toilet integer bt_total Total integer bt_unimproved Unimproved . <=${bt_total} calculate bt_cimproved ${bt_total} - ${bt_unimproved} integer bt_improved Improved . <= ${bt_cimproved} Improved toilet should be less than or equal to ${bt_cimproved} in your case. end group

My purpose is when the users enter the data in Improved, it should show the
remaining number. How to make calculation field to show in
constraint_message?

Thanks,
Chan Choth

Dear all,

I found the solution now. We can't put in the constraint_message, but we
can put in the hint. Hope our ODK developer will think about this feature
in the future.

Thanks,
Chan Choth

··· On Thursday, February 21, 2013 10:26:19 AM UTC+7, Chan Choth wrote: > > Dear all, > > I did as below: > > type name label calculation constraint > constraint_message > > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > begin group baseline_toilet Baseline of toilet > integer bt_total Total > integer bt_unimproved Unimproved . <=${bt_total} > calculate bt_cimproved ${bt_total} - > ${bt_unimproved} > integer bt_improved Improved . <= ${bt_cimproved} > Improved toilet should be less than or equal to ${bt_cimproved} in your > case. > end group > > My purpose is when the users enter the data in Improved, it should show > the remaining number. How to make calculation field to show in > constraint_message? > > Thanks, > Chan Choth >

The next ODK Collect will be able to leverage the itext features for
customized required-but-not-present and constraint-violated messages.

This will enable you to reference values within the constraint message.

(Code for this is already in the code repository).

Mitch

··· On Thu, Feb 21, 2013 at 12:10 AM, Chan Choth wrote:

Dear all,

I found the solution now. We can't put in the constraint_message, but we
can put in the hint. Hope our ODK developer will think about this feature
in the future.

Thanks,
Chan Choth

On Thursday, February 21, 2013 10:26:19 AM UTC+7, Chan Choth wrote:

Dear all,

I did as below:

type name label calculation constraint
constraint_message
------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------

begin group baseline_toilet Baseline of toilet
integer bt_total Total
integer bt_unimproved Unimproved . <=${bt_total}
calculate bt_cimproved ${bt_total} -
${bt_unimproved}
integer bt_improved Improved . <= ${bt_cimproved}
Improved toilet should be less than or equal to ${bt_cimproved} in your
case.
end group

My purpose is when the users enter the data in Improved, it should show
the remaining number. How to make calculation field to show in
constraint_message?

Thanks,
Chan Choth

--

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,

Has this capability been implemented in ODK Collect now? When I try to reference a calculate field in a constraint message, it shows up as "${2}" rather than the text string that I would like - even though the text string works in a note field.

Thanks,
Laura

··· On Thursday, February 21, 2013 at 6:51:01 PM UTC, Mitch Sundt wrote: > The next ODK Collect will be able to leverage the itext features for customized required-but-not-present and constraint-violated messages. > > This will enable you to reference values within the constraint message. > > > (Code for this is already in the code repository). > > Mitch > > > On Thu, Feb 21, 2013 at 12:10 AM, Chan Choth wrote: > > Dear all, > > > I found the solution now. We can't put in the constraint_message, but we can put in the hint. Hope our ODK developer will think about this feature in the future. > > > > Thanks, > Chan Choth > > > > On Thursday, February 21, 2013 10:26:19 AM UTC+7, Chan Choth wrote: > Dear all, > > > I did as below: > > > > type name label calculation constraint constraint_message > > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > begin group baseline_toilet Baseline of toilet > integer bt_total Total > > integer bt_unimproved Unimproved . <=${bt_total} > > calculate bt_cimproved ${bt_total} - ${bt_unimproved} > > integer bt_improved Improved . <= ${bt_cimproved} Improved toilet should be less than or equal to ${bt_cimproved} in your case. > > end group > > > My purpose is when the users enter the data in Improved, it should show the remaining number. How to make calculation field to show in constraint_message? > > > > Thanks, > Chan Choth > > > > > > > -- > > -- > > 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. > > > > > > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com

Hi Laura,

This sounds like a bug! Can you please file it at
https://github.com/opendatakit/collect/issues/new with a test form?
Once we have that, it should be much easier to fix it.

Thanks,

Yaw

··· On Tue, Apr 11, 2017 at 9:30 AM, wrote: > Hi, > > Has this capability been implemented in ODK Collect now? When I try to reference a calculate field in a constraint message, it shows up as "${2}" rather than the text string that I would like - even though the text string works in a note field. > > Thanks, > Laura > > On Thursday, February 21, 2013 at 6:51:01 PM UTC, Mitch Sundt wrote: >> The next ODK Collect will be able to leverage the itext features for customized required-but-not-present and constraint-violated messages. >> >> This will enable you to reference values within the constraint message. >> >> >> (Code for this is already in the code repository). >> >> Mitch >> >> >> On Thu, Feb 21, 2013 at 12:10 AM, Chan Choth wrote: >> >> Dear all, >> >> >> I found the solution now. We can't put in the constraint_message, but we can put in the hint. Hope our ODK developer will think about this feature in the future. >> >> >> >> Thanks, >> Chan Choth >> >> >> >> On Thursday, February 21, 2013 10:26:19 AM UTC+7, Chan Choth wrote: >> Dear all, >> >> >> I did as below: >> >> >> >> type name label calculation constraint constraint_message >> >> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- >> >> begin group baseline_toilet Baseline of toilet >> integer bt_total Total >> >> integer bt_unimproved Unimproved . <=${bt_total} >> >> calculate bt_cimproved ${bt_total} - ${bt_unimproved} >> >> integer bt_improved Improved . <= ${bt_cimproved} Improved toilet should be less than or equal to ${bt_cimproved} in your case. >> >> end group >> >> >> My purpose is when the users enter the data in Improved, it should show the remaining number. How to make calculation field to show in constraint_message? >> >> >> >> Thanks, >> Chan Choth >> >> >> >> >> >> >> -- >> >> -- >> >> 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. >> >> >> >> >> >> >> >> >> -- >> Mitch Sundt >> Software Engineer >> University of Washington >> mitche...@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 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, sure - I've just put an example form up. Thank you!

Laura

And thank you for filing! It's been assigned and we'll put updates on
progress in the issue.

··· On Wed, Apr 12, 2017 at 2:59 AM, wrote: > Hi Yaw, sure - I've just put an example form up. Thank you! > > Laura > > -- > -- > 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.