I am having an issue with a repeat count in my survey where the default value is 1 even when no record is created.
the survey is a nested repeat, both main repeat and nested repeat appearances are set to minimal compact so you have to press the "+" button to create a record.
For the main repeat table I have a field outside the repeat with count (${mainRepeat}) in the calculation column which is behaving as expected, the value is 0 until you press the "+" to create the first record in the repeat at which point it becomes 1, and grows with the number of repeats added.
For the nested repeat I have a field outside it (but within the main repeat) with count(${nestedRepeat}) in the calculation but this shows as 1 even when there is no initial record created in the repeat (see below). Once records are created it behaves as expected, however in some instances I may not require any records and would like the count to show as 0
I have read that there are issues with this where calculations are involved inside the repeats but it works on the main repeat so a bit baffled as to why it behaves differently on a nested repeat.
For a workaround I have used a count of the geopoint question in the nested repeat which is ok in this instance as it is a required question so will always count correctly, however relying on this method may not always work depending on whether questions are required or not
Any ideas would be welcomed
I wonder if it is similar to this issue?
Like you I always count a field that has to be filled out in the repeat and it seems to work better.
Sometimes I have used the relevant on the begin repeat line but I cannot exactly remember what that was doing.