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

467
1
Jump to solution
10-17-2019 07:33 AM
ColinCampbell
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)
0 Kudos
1 Solution

Accepted Solutions
AdminValorInmueble
New Contributor III

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:

typenamelabelcalculationrepeat_count
begin repeatGrupoRepeatRepeat Group10
textquestionAQuestion A
calculatecteAuxiliar1
calculatecountquadratQuadratonce(count(${cte}))
noteQuadrat Number: <b>${countquadrat}
end repeat

I attach the sample xlsx.

Reggards

View solution in original post

1 Reply
AdminValorInmueble
New Contributor III

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:

typenamelabelcalculationrepeat_count
begin repeatGrupoRepeatRepeat Group10
textquestionAQuestion A
calculatecteAuxiliar1
calculatecountquadratQuadratonce(count(${cte}))
noteQuadrat Number: <b>${countquadrat}
end repeat

I attach the sample xlsx.

Reggards