Repeat_count not working

Hello All- I have a second question topic unrelated to my earlier post
today.

I am trying to base a repeat off of a respondents earlier answer. The
initial question is how many sexual partners have you had in the last 6
months (n) followed by a
series of questions that everyone answers on their most recent sexual
partner (this is working fine) the problem comes in next when I attempt to
add a repeat section where the respondent is asked a different set of
questions on their remaining sexual partners so (n-1) because they already
responded for the most recent of their n total sex partners.

So if a person says they have 4 recent sexual partners they are asked about
the first and then would have a set of 3 repeat questions. I added a
repeat_count column in my XLSform but regardless of my code unless i put an
integer in the repeat is open ended where I can continually press the +
sign in enketo and add as many subjects as I want.

Is there a workaround?

Are you trying to obtain n-1 dynamically? I think you can just introduce a
calculate question to capture n-1 and put it in repeat-count column.

··· On Saturday, February 21, 2015 at 4:10:45 AM UTC+7, Kasey O'Neil-Ferreira wrote: > > Hello All- I have a second question topic unrelated to my earlier post > today. > > I am trying to base a repeat off of a respondents earlier answer. The > initial question is how many sexual partners have you had in the last 6 > months (n) followed by a > series of questions that everyone answers on their most recent sexual > partner (this is working fine) the problem comes in next when I attempt to > add a repeat section where the respondent is asked a different set of > questions on their remaining sexual partners so (n-1) because they already > responded for the most recent of their n total sex partners. > > So if a person says they have 4 recent sexual partners they are asked > about the first and then would have a set of 3 repeat questions. I added a > repeat_count column in my XLSform but regardless of my code unless i put an > integer in the repeat is open ended where I can continually press the + > sign in enketo and add as many subjects as I want. > > Is there a workaround? > >

I am trying to restrict the repeat_count dynamically. I added a calculate
field and then a note (to ensure the calculation is working correct) but it
still will not restrict my repeat count. I am able to calculate n-1
dynamically but then the repeat_count remains open ended.

Kasey

··· On Friday, February 20, 2015 at 4:10:45 PM UTC-5, Kasey O'Neil-Ferreira wrote: > > Hello All- I have a second question topic unrelated to my earlier post > today. > > I am trying to base a repeat off of a respondents earlier answer. The > initial question is how many sexual partners have you had in the last 6 > months (n) followed by a > series of questions that everyone answers on their most recent sexual > partner (this is working fine) the problem comes in next when I attempt to > add a repeat section where the respondent is asked a different set of > questions on their remaining sexual partners so (n-1) because they already > responded for the most recent of their n total sex partners. > > So if a person says they have 4 recent sexual partners they are asked > about the first and then would have a set of 3 repeat questions. I added a > repeat_count column in my XLSform but regardless of my code unless i put an > integer in the repeat is open ended where I can continually press the + > sign in enketo and add as many subjects as I want. > > Is there a workaround? > >

Also- repeat count works if I enter an integer alone but not when i use a
previously calculated field.

Hi there,

I know this post is super old but I am having the exact same issue on the repeat_count not being taken into account. Could anyone of you share the trick?

Thanks a million,
Lisa

We have had this kind of cases many times, even with very big forms, but
had no problem so far. Can you share your xlsform? I might be able to take
a look.

··· On Monday, February 23, 2015 at 11:55:02 PM UTC+7, Kasey O'Neil-Ferreira wrote: > > Also- repeat count works if I enter an integer alone but not when i use a > previously calculated field. >

Hi Lisa,

What version of ODK Collect are you using? Does it work if
repeat_count is static (e.g., 2)?

Yaw

··· -- Need ODK consultants? Nafundi provides form design, server setup, in-field training, and software development for ODK. Go to https://nafundi.com to get started.

On Sat, Apr 9, 2016 at 2:30 PM, lisa.daoud@gmail.com wrote:

Hi there,

I know this post is super old but I am having the exact same issue on the repeat_count not being taken into account. Could anyone of you share the trick?

Thanks a million,
Lisa

--

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.