I'm struggling to find a way to create a name for every repeat group iteration in my repeat groups. For instance, my repeat group contains the following questions:
What was the firm's profit?
What was the firm's revenues?
What was the firm's costs?
I would like to repeat this group of questions for the years: 2014, 2016, and 2016. Is there a way to label each instance/iteration of the repeat group by the year (i.e. name the first "2014" and second "2016" and third "2016")
There is no a perfect solution. You can try this form: repeatGroupLabels.xml (2.2 KB)
The problem is solved by adding a regular group (and label) inside repeat but it causes a problem with navigation: https://github.com/opendatakit/javarosa/issues/278 which is solved but waits for merging: https://github.com/opendatakit/javarosa/pull/279
You can find more info here: https://github.com/opendatakit/xforms-spec/issues/141
Thank you Grzegorz,
Is there any way you can help me with this on an XLSform instead of XML? I'm fairly new to this and have only been using XLS so far.
It would be something like that: repeatLabels.xlsx (5.0 KB)
You could always just add a text question with a default answer of the specific year and make it read-only within each repeat group. Assuming you have a distinct repeat group for each year this would ensure that your answers have a column identifying the year in question;this may work for you?
Right! That's a good idea. Will try that. Thanks David.