I have a survey where a fieldworker needs to go to a site and survey 10 quadrats within that site. On my form I have a repeat for the quadrat information limited to 10 repeats. The fieldworker needs to record which quadrat of the 10 they are working on, but rather than entering a number themselves I was wondering if it was possible to extract the repeat number (as show the bottom of the repeat - e.g. 2 of 10) and feed it into a field? At the moment my users are a bit confused as to they must enter a quadrat number when as far as they're concerned it's effectively already shown on the form.
Solved! Go to Solution.
Hi Colin Campbell,
You can use two counting fields, the first would be constant, and the second in increment, but calculated only once. Use the count () function:
type | name | label | calculation | repeat_count |
begin repeat | GrupoRepeat | Repeat Group | 10 | |
text | questionA | Question A | ||
calculate | cte | Auxiliar | 1 | |
calculate | countquadrat | Quadrat | once(count(${cte})) | |
note | Quadrat Number: <b>${countquadrat} | |||
end repeat |
I attach the sample xlsx.
Reggards
Hi Colin Campbell,
You can use two counting fields, the first would be constant, and the second in increment, but calculated only once. Use the count () function:
type | name | label | calculation | repeat_count |
begin repeat | GrupoRepeat | Repeat Group | 10 | |
text | questionA | Question A | ||
calculate | cte | Auxiliar | 1 | |
calculate | countquadrat | Quadrat | once(count(${cte})) | |
note | Quadrat Number: <b>${countquadrat} | |||
end repeat |
I attach the sample xlsx.
Reggards