Default values for questions work just once in a repeat group

Hi All,

It is required in the survey to have some questions default values i.e.

0

During the repeat, the first time it works fine, but during 2nd and
subsequent repeats the default value(s) are not there anymore.

Any ideas?

Form is attached, notice during 2nd repeat when it asks questions about
each household member entered in the 1st repeat.

Best,
Ayub

choiceOfRepeat.xml (6.33 KB)

Okay, so i tried with a really simple form (attached), like so:

0 0 DEFAULT/PRESET Values Test Inside Repeat Group First Default/Preset Value Second Default/Preset Value

And the problem is still there, i.e. it shows 0 as default value for two
questions during the first iteration, but at 2nd or 3rd ... the value is
gone. Can't we retain preset/default values for a question in Repeat
Groups
? or is there a workaround to it?

Ayub

repeatTest.xml (1.28 KB)

This is not the correct syntax for template defaults in repeat groups.

What you did was define a form with an already-created, pre-populated 1st
repeat.

The correct syntax is:

0 0

The jr:template="" is critical -- it defines the default values for a
newly created group. Without it, you are just defining an already-filled-in
instance of the repeat group.

ยทยทยท On Fri, Nov 7, 2014 at 5:03 AM, Ayub wrote:

Okay, so i tried with a really simple form (attached), like so:

0 0 DEFAULT/PRESET Values Test Inside Repeat Group First Default/Preset Value Second Default/Preset Value

And the problem is still there, i.e. it shows 0 as default value for two
questions during the first iteration, but at 2nd or 3rd ... the value is
gone. Can't we retain preset/default values for a question in Repeat
Groups
? or is there a workaround to it?

Ayub

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

It worked = ) Thanks for your reply and time Mitch.