Select to view content in your preferred language

# Is it possible to extract/use the repeat number from the form?

556
1
10-17-2019 07:33 AM
Occasional Contributor

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.

Tags (3)
1 Solution

Accepted Solutions
New Contributor III

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: \${countquadrat} end repeat

I attach the sample xlsx.

Reggards