How do I break out of a repeat group with a personalized message?

Hi Community

I try to run the attached XlsForm example, but i got this error:

08-06 14:31:06.392: E/MessageQueue-JNI(1098): Exception in MessageQueue
callback: handleReceiveCallback

08-06 14:31:06.452: E/MessageQueue-JNI(1098):
org.javarosa.core.log.WrappedException: Error evaluating
/breakRepeat/miembros/BREAK0:
org.javarosa.xpath.XPathTypeMismatchException: XPath evaluation: type
mismatch nodeset has more than one node[/breakRepeat/miembros[1]/cuerpo[1]/BREAK1[1];/breakRepeat/miembros[2]/cuerpo[1]/BREAK1[1]];
cannot convert to value =>
org.javarosa.xpath.XPathTypeMismatchException[XPath evaluation: type
mismatch nodeset has more than one node
[/breakRepeat/miembros[1]/cuerpo[1]/BREAK1[1];/breakRepeat/miembros[2]/cuerpo[1]/BREAK1[1]];
cannot convert to value]

08-06 14:31:06.452: E/MessageQueue-JNI(1098): at
org.javarosa.core.model.FormDef.evaluateTriggerable(FormDef.java:712)

Thanks for any help

breakRepeat.xls (29 KB)

Please send questions to ONLY ONE e-mail group.

Sending to multiple groups just annoys the people who are most likely to
reply (I have 3 copies of this question... annoyed!)

I've created an issue for this:
http://code.google.com/p/opendatakit/issues/detail?id=884

I believe this should work. However, your usage of indexed-repeat() is
unexpected.

indexed-repeat() is intended for referencing the values of a different
repeat group -- one that the form field using indexed-repeat is not itself
contained within.

··· On Tue, Aug 6, 2013 at 7:42 AM, Ramon de la Cruz Lazaro <rmdlazaro@gmail.com wrote:

Hi Community

I try to run the attached XlsForm example, but i got this error:

08-06 14:31:06.392: E/MessageQueue-JNI(1098): Exception in MessageQueue
callback: handleReceiveCallback

08-06 14:31:06.452: E/MessageQueue-JNI(1098):
org.javarosa.core.log.WrappedException: Error evaluating
/breakRepeat/miembros/BREAK0:
org.javarosa.xpath.XPathTypeMismatchException: XPath evaluation: type
mismatch nodeset has more than one node[/breakRepeat/miembros[1]/cuerpo[1]/BREAK1[1];/breakRepeat/miembros[2]/cuerpo[1]/BREAK1[1]];
cannot convert to value =>
org.javarosa.xpath.XPathTypeMismatchException[XPath evaluation: type
mismatch nodeset has more than one node
[/breakRepeat/miembros[1]/cuerpo[1]/BREAK1[1];/breakRepeat/miembros[2]/cuerpo[1]/BREAK1[1]];
cannot convert to value]

08-06 14:31:06.452: E/MessageQueue-JNI(1098): at
org.javarosa.core.model.FormDef.evaluateTriggerable(FormDef.java:712)

Thanks for any help

--

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

Thanks for responding quickly.

Sorry for posting three times.

I have not been able to implement a repeat break with custom message. I
always get errors.

Is there any way to implement it without using indexed-repeat() ?

··· 2013/8/6 Mitch Sundt

Please send questions to ONLY ONE e-mail group.

Sending to multiple groups just annoys the people who are most likely to
reply (I have 3 copies of this question... annoyed!)

I've created an issue for this:
http://code.google.com/p/opendatakit/issues/detail?id=884

I believe this should work. However, your usage of indexed-repeat() is
unexpected.

indexed-repeat() is intended for referencing the values of a different
repeat group -- one that the form field using indexed-repeat is not itself
contained within.

On Tue, Aug 6, 2013 at 7:42 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi Community

I try to run the attached XlsForm example, but i got this error:

08-06 14:31:06.392: E/MessageQueue-JNI(1098): Exception in MessageQueue
callback: handleReceiveCallback

08-06 14:31:06.452: E/MessageQueue-JNI(1098):
org.javarosa.core.log.WrappedException: Error evaluating
/breakRepeat/miembros/BREAK0:
org.javarosa.xpath.XPathTypeMismatchException: XPath evaluation: type
mismatch nodeset has more than one node[/breakRepeat/miembros[1]/cuerpo[1]/BREAK1[1];/breakRepeat/miembros[2]/cuerpo[1]/BREAK1[1]];
cannot convert to value =>
org.javarosa.xpath.XPathTypeMismatchException[XPath evaluation: type
mismatch nodeset has more than one node
[/breakRepeat/miembros[1]/cuerpo[1]/BREAK1[1];/breakRepeat/miembros[2]/cuerpo[1]/BREAK1[1]];
cannot convert to value]

08-06 14:31:06.452: E/MessageQueue-JNI(1098): at
org.javarosa.core.model.FormDef.evaluateTriggerable(FormDef.java:712)

Thanks for any help

--

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

--
Atte
Ramón De la Cruz L.

Ramon,

Your BREAK0 field references BREAK1, which is inside a group that has its
relevance controlled by BREAK0. This would seem to be a logical conundrum.
I'm not sure that a group within a repeat can have a relevance that's based
on a calculated field within the repeat. More broadly, I'm not sure that
it's possible to accomplish what you seem to be trying to accomplish: have
a repeating group that continues repeating until some dynamic condition is
met (i.e., until within-repeat fields satisfy some condition).

Your two primary choices for repeat groups are:

  1. Specify a repeat-count based on some prior fields, and the repeat group
    will repeat exactly that number of times.

  2. Or, do not specify a repeat-count, in which case the pop-up prompt will
    ask whether to add new instances.

Maybe somebody else has a clever third option?

Best,

Chris

··· On Tue, Aug 6, 2013 at 7:47 PM, Ramon de la Cruz Lazaro <rmdlazaro@gmail.com wrote:

Thanks for responding quickly.

Sorry for posting three times.

I have not been able to implement a repeat break with custom message. I
always get errors.

Is there any way to implement it without using indexed-repeat() ?

2013/8/6 Mitch Sundt mitchellsundt@gmail.com

Please send questions to ONLY ONE e-mail group.

Sending to multiple groups just annoys the people who are most likely to
reply (I have 3 copies of this question... annoyed!)

I've created an issue for this:
http://code.google.com/p/opendatakit/issues/detail?id=884

I believe this should work. However, your usage of indexed-repeat() is
unexpected.

indexed-repeat() is intended for referencing the values of a different
repeat group -- one that the form field using indexed-repeat is not itself
contained within.

On Tue, Aug 6, 2013 at 7:42 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi Community

I try to run the attached XlsForm example, but i got this error:

08-06 14:31:06.392: E/MessageQueue-JNI(1098): Exception in MessageQueue
callback: handleReceiveCallback

08-06 14:31:06.452: E/MessageQueue-JNI(1098):
org.javarosa.core.log.WrappedException: Error evaluating
/breakRepeat/miembros/BREAK0:
org.javarosa.xpath.XPathTypeMismatchException: XPath evaluation: type
mismatch nodeset has more than one node[/breakRepeat/miembros[1]/cuerpo[1]/BREAK1[1];/breakRepeat/miembros[2]/cuerpo[1]/BREAK1[1]];
cannot convert to value =>
org.javarosa.xpath.XPathTypeMismatchException[XPath evaluation: type
mismatch nodeset has more than one node
[/breakRepeat/miembros[1]/cuerpo[1]/BREAK1[1];/breakRepeat/miembros[2]/cuerpo[1]/BREAK1[1]];
cannot convert to value]

08-06 14:31:06.452: E/MessageQueue-JNI(1098): at
org.javarosa.core.model.FormDef.evaluateTriggerable(FormDef.java:712)

Thanks for any help

--

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

--
Atte
Ramón De la Cruz L.

--

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.

I prefer the second alternative. But how do I leave the repeat group with a
select_one yes_no; without displaying the default pop-up prompt.

I think, it could create a select_one with appearance = "break Y N" (or
"break 1 0", "break 1 2")

Y) break the repeat group
N) continue the next iteration

Ramon

··· 2013/8/6 Christopher Robert

Ramon,

Your BREAK0 field references BREAK1, which is inside a group that has its
relevance controlled by BREAK0. This would seem to be a logical conundrum.
I'm not sure that a group within a repeat can have a relevance that's based
on a calculated field within the repeat. More broadly, I'm not sure that
it's possible to accomplish what you seem to be trying to accomplish: have
a repeating group that continues repeating until some dynamic condition is
met (i.e., until within-repeat fields satisfy some condition).

Your two primary choices for repeat groups are:

  1. Specify a repeat-count based on some prior fields, and the repeat group
    will repeat exactly that number of times.

  2. Or, do not specify a repeat-count, in which case the pop-up prompt will
    ask whether to add new instances.

Maybe somebody else has a clever third option?

Best,

Chris

On Tue, Aug 6, 2013 at 7:47 PM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Thanks for responding quickly.

Sorry for posting three times.

I have not been able to implement a repeat break with custom message. I
always get errors.

Is there any way to implement it without using indexed-repeat() ?

2013/8/6 Mitch Sundt mitchellsundt@gmail.com

Please send questions to ONLY ONE e-mail group.

Sending to multiple groups just annoys the people who are most likely to
reply (I have 3 copies of this question... annoyed!)

I've created an issue for this:
http://code.google.com/p/opendatakit/issues/detail?id=884

I believe this should work. However, your usage of indexed-repeat() is
unexpected.

indexed-repeat() is intended for referencing the values of a different
repeat group -- one that the form field using indexed-repeat is not itself
contained within.

On Tue, Aug 6, 2013 at 7:42 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi Community

I try to run the attached XlsForm example, but i got this error:

08-06 14:31:06.392: E/MessageQueue-JNI(1098): Exception in MessageQueue
callback: handleReceiveCallback

08-06 14:31:06.452: E/MessageQueue-JNI(1098):
org.javarosa.core.log.WrappedException: Error evaluating
/breakRepeat/miembros/BREAK0:
org.javarosa.xpath.XPathTypeMismatchException: XPath evaluation: type
mismatch nodeset has more than one node[/breakRepeat/miembros[1]/cuerpo[1]/BREAK1[1];/breakRepeat/miembros[2]/cuerpo[1]/BREAK1[1]];
cannot convert to value =>
org.javarosa.xpath.XPathTypeMismatchException[XPath evaluation: type
mismatch nodeset has more than one node
[/breakRepeat/miembros[1]/cuerpo[1]/BREAK1[1];/breakRepeat/miembros[2]/cuerpo[1]/BREAK1[1]];
cannot convert to value]

08-06 14:31:06.452: E/MessageQueue-JNI(1098): at
org.javarosa.core.model.FormDef.evaluateTriggerable(FormDef.java:712)

Thanks for any help

--

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

--
Atte
Ramón De la Cruz L.

--

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.

--

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

--
Atte
Ramón De la Cruz L.

To my knowledge, this is not possible.
Creating another repeat group is not something under the control of the
form definition, other than setting an overall maximum number of repeats.

··· On Thu, Aug 8, 2013 at 9:50 AM, Ramon de la Cruz Lazaro <rmdlazaro@gmail.com wrote:

I prefer the second alternative. But how do I leave the repeat group with
a select_one yes_no; without displaying the default pop-up prompt.

I think, it could create a select_one with appearance = "break Y N" (or
"break 1 0", "break 1 2")

Y) break the repeat group
N) continue the next iteration

Ramon

2013/8/6 Christopher Robert crobert@surveycto.com

Ramon,

Your BREAK0 field references BREAK1, which is inside a group that has its
relevance controlled by BREAK0. This would seem to be a logical conundrum.
I'm not sure that a group within a repeat can have a relevance that's based
on a calculated field within the repeat. More broadly, I'm not sure that
it's possible to accomplish what you seem to be trying to accomplish: have
a repeating group that continues repeating until some dynamic condition is
met (i.e., until within-repeat fields satisfy some condition).

Your two primary choices for repeat groups are:

  1. Specify a repeat-count based on some prior fields, and the repeat
    group will repeat exactly that number of times.

  2. Or, do not specify a repeat-count, in which case the pop-up prompt
    will ask whether to add new instances.

Maybe somebody else has a clever third option?

Best,

Chris

On Tue, Aug 6, 2013 at 7:47 PM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Thanks for responding quickly.

Sorry for posting three times.

I have not been able to implement a repeat break with custom message. I
always get errors.

Is there any way to implement it without using indexed-repeat() ?

2013/8/6 Mitch Sundt mitchellsundt@gmail.com

Please send questions to ONLY ONE e-mail group.

Sending to multiple groups just annoys the people who are most likely
to reply (I have 3 copies of this question... annoyed!)

I've created an issue for this:
http://code.google.com/p/opendatakit/issues/detail?id=884

I believe this should work. However, your usage of indexed-repeat() is
unexpected.

indexed-repeat() is intended for referencing the values of a different
repeat group -- one that the form field using indexed-repeat is not itself
contained within.

On Tue, Aug 6, 2013 at 7:42 AM, Ramon de la Cruz Lazaro < rmdlazaro@gmail.com> wrote:

Hi Community

I try to run the attached XlsForm example, but i got this error:

08-06 14:31:06.392: E/MessageQueue-JNI(1098): Exception in
MessageQueue callback: handleReceiveCallback

08-06 14:31:06.452: E/MessageQueue-JNI(1098):
org.javarosa.core.log.WrappedException: Error evaluating
/breakRepeat/miembros/BREAK0:
org.javarosa.xpath.XPathTypeMismatchException: XPath evaluation: type
mismatch nodeset has more than one node[/breakRepeat/miembros[1]/cuerpo[1]/BREAK1[1];/breakRepeat/miembros[2]/cuerpo[1]/BREAK1[1]];
cannot convert to value =>
org.javarosa.xpath.XPathTypeMismatchException[XPath evaluation: type
mismatch nodeset has more than one node
[/breakRepeat/miembros[1]/cuerpo[1]/BREAK1[1];/breakRepeat/miembros[2]/cuerpo[1]/BREAK1[1]];
cannot convert to value]

08-06 14:31:06.452: E/MessageQueue-JNI(1098): at
org.javarosa.core.model.FormDef.evaluateTriggerable(FormDef.java:712)

Thanks for any help

--

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

--
Atte
Ramón De la Cruz L.

--

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.

--

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

--
Atte
Ramón De la Cruz L.

--

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