Displaying repeat count in repeat group

Hi all,

In a repeat group that’s meant to register individual children in a
household, we would like to include at the end of the group sequence a
label that says:

“NOTE: You said that there are children
in this household. You have now registered
children. Please determine whether to register another child.”

After swiping, the “Add new group?” popup should appear.

Is there a way to display the cumulative repeat count as indicated above?

Also, in the form builder, there’s an option that says “Disallow Repeat Add
and Remove.” Adding groups is self-evident, but if this option is left
unchecked, how exactly can the user remove groups?

Thanks,
Scott

Hi all,

Regarding:

Also, in the form builder, there’s an option that says "Disallow Repeat Add

and Remove." Adding groups is self-evident, but if this option is left
unchecked, how exactly can the user remove groups?

As additional information, this is from Fawziya Karim, my colleague in
Kenya who began training our surveyors today:

there is something strange happening with these repeats: if by mistake you
hit “add group” and realize that you don’t need another group, it is hard
to undo this. You will still have to go through that entire group. I tried
going back few questions hoping that I will get the “ad group/do not add
group” prompt again but it does not show up. And this only happened on some
phones. On some phones, going back to the previous question would bring
back the prompt but in some others it doesn’t. I encountered this problem
at least 4 times. Do you know what might going on?

All of the phones are Moto G’s running Jelly Bean and the latest version of
CommCareODK.

Thanks,
Scott

··· On Tue, Feb 4, 2014 at 9:59 PM, Scott Lee wrote:

Hi all,

In a repeat group that’s meant to register individual children in a
household, we would like to include at the end of the group sequence a
label that says:

“NOTE: You said that there are children
in this household. You have now registered
children. Please determine whether to register another child.”

After swiping, the “Add new group?” popup should appear.

Is there a way to display the cumulative repeat count as indicated above?

Also, in the form builder, there’s an option that says “Disallow Repeat
Add and Remove.” Adding groups is self-evident, but if this option is
left unchecked, how exactly can the user remove groups?

Thanks,
Scott

Hi Scott,

For your first q

··· On Wed, Feb 5, 2014 at 12:47 PM, Scott Lee wrote:

Hi all,

Regarding:

Also, in the form builder, there’s an option that says "Disallow Repeat

Add and Remove." Adding groups is self-evident, but if this option is
left unchecked, how exactly can the user remove groups?

As additional information, this is from Fawziya Karim, my colleague in
Kenya who began training our surveyors today:

there is something strange happening with these repeats: if by mistake
you hit “add group” and realize that you don’t need another group, it is
hard to undo this. You will still have to go through that entire group. I
tried going back few questions hoping that I will get the “ad group/do not
add group” prompt again but it does not show up. And this only happened on
some phones. On some phones, going back to the previous question would
bring back the prompt but in some others it doesn’t. I encountered this
problem at least 4 times. Do you know what might going on?

All of the phones are Moto G’s running Jelly Bean and the latest version
of CommCareODK.

Thanks,
Scott

On Tue, Feb 4, 2014 at 9:59 PM, Scott Lee scott.s.lee@gmail.com wrote:

Hi all,

In a repeat group that’s meant to register individual children in a
household, we would like to include at the end of the group sequence a
label that says:

“NOTE: You said that there are children
in this household. You have now registered
children. Please determine whether to register another child.”

After swiping, the “Add new group?” popup should appear.

Is there a way to display the cumulative repeat count as indicated above?

Also, in the form builder, there’s an option that says “Disallow Repeat
Add and Remove.” Adding groups is self-evident, but if this option is
left unchecked, how exactly can the user remove groups?

Thanks,
Scott


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Whoops, sorry about that accidental send all.

To your first question I would recommend checking out the “count” function
here:
https://confluence.dimagi.com/display/commcarepublic/CommCare+Functions#CommCareFunctions-count

If you set a hidden value within your repeat group to calculate the count
of whatever value you’re repeating over (for example, /data/repeat_node/)
then you should get the current iteration for every group.

As to that error, if you would navigate to the application that’s having a
problem on HQ and report a problem through that page I would be happy to
take a look.

Best,
Will

··· On Wed, Feb 5, 2014 at 1:01 PM, William Pride wrote:

Hi Scott,

For your first q

On Wed, Feb 5, 2014 at 12:47 PM, Scott Lee scott.s.lee@gmail.com wrote:

Hi all,

Regarding:

Also, in the form builder, there’s an option that says "Disallow Repeat

Add and Remove." Adding groups is self-evident, but if this option is
left unchecked, how exactly can the user remove groups?

As additional information, this is from Fawziya Karim, my colleague in
Kenya who began training our surveyors today:

there is something strange happening with these repeats: if by mistake
you hit “add group” and realize that you don’t need another group, it is
hard to undo this. You will still have to go through that entire group. I
tried going back few questions hoping that I will get the “ad group/do not
add group” prompt again but it does not show up. And this only happened on
some phones. On some phones, going back to the previous question would
bring back the prompt but in some others it doesn’t. I encountered this
problem at least 4 times. Do you know what might going on?

All of the phones are Moto G’s running Jelly Bean and the latest version
of CommCareODK.

Thanks,
Scott

On Tue, Feb 4, 2014 at 9:59 PM, Scott Lee scott.s.lee@gmail.com wrote:

Hi all,

In a repeat group that’s meant to register individual children in a
household, we would like to include at the end of the group sequence a
label that says:

“NOTE: You said that there are
children in this household. You have now registered children. Please determine whether to register another child.”

After swiping, the “Add new group?” popup should appear.

Is there a way to display the cumulative repeat count as indicated above?

Also, in the form builder, there’s an option that says “Disallow Repeat
Add and Remove.” Adding groups is self-evident, but if this option is
left unchecked, how exactly can the user remove groups?

Thanks,
Scott


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Will,

Thanks for the advice. That works great.

As a follow-up just for learning purposes, this works when the repeat count
is first stored as a hidden value, and then the display text references the
hidden value.

However, it doesn’t work if the display text references the repeat count
directly, as in .

Is there a logic behind that? I’ve noticed that display text also can’t
handle IF statements. Can display text only directly reference question IDs
(whether standard questions or hidden values)?

Thanks again,
Scott

··· On Wed, Feb 5, 2014 at 1:04 PM, William Pride wrote:

Whoops, sorry about that accidental send all.

To your first question I would recommend checking out the “count” function
here:
https://confluence.dimagi.com/display/commcarepublic/CommCare+Functions#CommCareFunctions-count

If you set a hidden value within your repeat group to calculate the count
of whatever value you’re repeating over (for example, /data/repeat_node/)
then you should get the current iteration for every group.

As to that error, if you would navigate to the application that’s having a
problem on HQ and report a problem through that page I would be happy to
take a look.

Best,
Will

On Wed, Feb 5, 2014 at 1:01 PM, William Pride wpride@dimagi.com wrote:

Hi Scott,

For your first q

On Wed, Feb 5, 2014 at 12:47 PM, Scott Lee scott.s.lee@gmail.com wrote:

Hi all,

Regarding:

Also, in the form builder, there’s an option that says "Disallow Repeat

Add and Remove." Adding groups is self-evident, but if this option is
left unchecked, how exactly can the user remove groups?

As additional information, this is from Fawziya Karim, my colleague in
Kenya who began training our surveyors today:

there is something strange happening with these repeats: if by mistake
you hit “add group” and realize that you don’t need another group, it is
hard to undo this. You will still have to go through that entire group. I
tried going back few questions hoping that I will get the “ad group/do not
add group” prompt again but it does not show up. And this only happened on
some phones. On some phones, going back to the previous question would
bring back the prompt but in some others it doesn’t. I encountered this
problem at least 4 times. Do you know what might going on?

All of the phones are Moto G’s running Jelly Bean and the latest version
of CommCareODK.

Thanks,
Scott

On Tue, Feb 4, 2014 at 9:59 PM, Scott Lee scott.s.lee@gmail.com wrote:

Hi all,

In a repeat group that’s meant to register individual children in a
household, we would like to include at the end of the group sequence a
label that says:

“NOTE: You said that there are
children in this household. You have now registered children. Please determine whether to register another child.”

After swiping, the “Add new group?” popup should appear.

Is there a way to display the cumulative repeat count as indicated
above?

Also, in the form builder, there’s an option that says “Disallow
Repeat Add and Remove.” Adding groups is self-evident, but if this
option is left unchecked, how exactly can the user remove groups?

Thanks,
Scott


You received this message because you are subscribed to the Google
Groups “commcare-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Scott,

Luckily there is an easy answer to this one!

if you use “output ref” it will only be able to directly reference question
IDs. If you use “output value” you can reference xpath expressions as well
as question IDs. We recommend always using “value” instead of “ref”, since
it does everything “ref” does and more!

So the output you want is: .

Thanks,
Amelia

··· On Mon, Feb 10, 2014 at 2:00 PM, Scott Lee wrote:

Hi Will,

Thanks for the advice. That works great.

As a follow-up just for learning purposes, this works when the repeat
count is first stored as a hidden value, and then the display text
references the hidden value.

However, it doesn’t work if the display text references the repeat count
directly, as in .

Is there a logic behind that? I’ve noticed that display text also can’t
handle IF statements. Can display text only directly reference question IDs
(whether standard questions or hidden values)?

Thanks again,
Scott

On Wed, Feb 5, 2014 at 1:04 PM, William Pride wpride@dimagi.com wrote:

Whoops, sorry about that accidental send all.

To your first question I would recommend checking out the "count"
function here:
https://confluence.dimagi.com/display/commcarepublic/CommCare+Functions#CommCareFunctions-count

If you set a hidden value within your repeat group to calculate the count
of whatever value you’re repeating over (for example, /data/repeat_node/)
then you should get the current iteration for every group.

As to that error, if you would navigate to the application that’s having
a problem on HQ and report a problem through that page I would be happy to
take a look.

Best,
Will

On Wed, Feb 5, 2014 at 1:01 PM, William Pride wpride@dimagi.com wrote:

Hi Scott,

For your first q

On Wed, Feb 5, 2014 at 12:47 PM, Scott Lee scott.s.lee@gmail.comwrote:

Hi all,

Regarding:

Also, in the form builder, there’s an option that says "Disallow

Repeat Add and Remove." Adding groups is self-evident, but if this
option is left unchecked, how exactly can the user remove groups?

As additional information, this is from Fawziya Karim, my colleague in
Kenya who began training our surveyors today:

there is something strange happening with these repeats: if by mistake
you hit “add group” and realize that you don’t need another group, it is
hard to undo this. You will still have to go through that entire group. I
tried going back few questions hoping that I will get the “ad group/do not
add group” prompt again but it does not show up. And this only happened on
some phones. On some phones, going back to the previous question would
bring back the prompt but in some others it doesn’t. I encountered this
problem at least 4 times. Do you know what might going on?

All of the phones are Moto G’s running Jelly Bean and the latest
version of CommCareODK.

Thanks,
Scott

On Tue, Feb 4, 2014 at 9:59 PM, Scott Lee scott.s.lee@gmail.comwrote:

Hi all,

In a repeat group that’s meant to register individual children in a
household, we would like to include at the end of the group sequence a
label that says:

“NOTE: You said that there are
children in this household. You have now registered children. Please determine whether to register another child.”

After swiping, the “Add new group?” popup should appear.

Is there a way to display the cumulative repeat count as indicated
above?

Also, in the form builder, there’s an option that says “Disallow
Repeat Add and Remove.” Adding groups is self-evident, but if this
option is left unchecked, how exactly can the user remove groups?

Thanks,
Scott


You received this message because you are subscribed to the Google
Groups “commcare-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks, Amelia – I always wondered what the difference was. Good to know!

Scott

··· On Tue, Feb 11, 2014 at 11:47 AM, Amelia Sagoff wrote:

Hi Scott,

Luckily there is an easy answer to this one!

if you use “output ref” it will only be able to directly reference
question IDs. If you use “output value” you can reference xpath expressions
as well as question IDs. We recommend always using “value” instead of
"ref", since it does everything “ref” does and more!

So the output you want is: .

Thanks,
Amelia

On Mon, Feb 10, 2014 at 2:00 PM, Scott Lee scott.s.lee@gmail.com wrote:

Hi Will,

Thanks for the advice. That works great.

As a follow-up just for learning purposes, this works when the repeat
count is first stored as a hidden value, and then the display text
references the hidden value.

However, it doesn’t work if the display text references the repeat count
directly, as in .

Is there a logic behind that? I’ve noticed that display text also can’t
handle IF statements. Can display text only directly reference question IDs
(whether standard questions or hidden values)?

Thanks again,
Scott

On Wed, Feb 5, 2014 at 1:04 PM, William Pride wpride@dimagi.com wrote:

Whoops, sorry about that accidental send all.

To your first question I would recommend checking out the "count"
function here:
https://confluence.dimagi.com/display/commcarepublic/CommCare+Functions#CommCareFunctions-count

If you set a hidden value within your repeat group to calculate the
count of whatever value you’re repeating over (for example,
/data/repeat_node/) then you should get the current iteration for every
group.

As to that error, if you would navigate to the application that’s having
a problem on HQ and report a problem through that page I would be happy to
take a look.

Best,
Will

On Wed, Feb 5, 2014 at 1:01 PM, William Pride wpride@dimagi.com wrote:

Hi Scott,

For your first q

On Wed, Feb 5, 2014 at 12:47 PM, Scott Lee scott.s.lee@gmail.comwrote:

Hi all,

Regarding:

Also, in the form builder, there’s an option that says "Disallow

Repeat Add and Remove." Adding groups is self-evident, but if this
option is left unchecked, how exactly can the user remove groups?

As additional information, this is from Fawziya Karim, my colleague in
Kenya who began training our surveyors today:

there is something strange happening with these repeats: if by
mistake you hit “add group” and realize that you don’t need another group,
it is hard to undo this. You will still have to go through that entire
group. I tried going back few questions hoping that I will get the “ad
group/do not add group” prompt again but it does not show up. And this only
happened on some phones. On some phones, going back to the previous
question would bring back the prompt but in some others it doesn’t. I
encountered this problem at least 4 times. Do you know what might going on?

All of the phones are Moto G’s running Jelly Bean and the latest
version of CommCareODK.

Thanks,
Scott

On Tue, Feb 4, 2014 at 9:59 PM, Scott Lee scott.s.lee@gmail.comwrote:

Hi all,

In a repeat group that’s meant to register individual children in a
household, we would like to include at the end of the group sequence a
label that says:

“NOTE: You said that there are
children in this household. You have now registered children. Please determine whether to register another child.”

After swiping, the “Add new group?” popup should appear.

Is there a way to display the cumulative repeat count as indicated
above?

Also, in the form builder, there’s an option that says “Disallow
Repeat Add and Remove.” Adding groups is self-evident, but if this
option is left unchecked, how exactly can the user remove groups?

Thanks,
Scott


You received this message because you are subscribed to the Google
Groups “commcare-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google
Groups “commcare-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.