Generate an automatic consecutive, using begin_repeat and begin_group

1. What is the problem? Be very detailed.
I want to automatically generate a consecutive number
2. What app or server are you using and on what device and operating system? Include version numbers.
XLSForm Online v2.3.3
3. What you have you tried to fix the problem?
I have read and tried Form Logic — ODK Docs
4. What steps can we take to reproduce the problem?
Sorry, I don't speak English well but I need help
5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.
prueba plantilla.xlsx (12.4 KB)

Hi @Fredy_Angarita
We're glad you're here. When you get a chance, please introduce yourself on this forum thread. I'd also encourage you to add a real picture as your avatar because it helps build community!

how about a solution like this:
prueba plantilla.xlsx (9.1 KB)

Thank you very much @Grzesiek2010
It has worked for me.
Can a modification be made? I want it to follow the consecutive, but from a number that the pollster enters in the form, other than from number 1, for example:
Pollster enters the number 4, from there the consecutive number begins, 5, 6, 7… n

It could be something like:
prueba plantilla.xlsx (9.2 KB)

Thank you very much for the solution,
Would it be possible not to use the "baseNumber" question?
Let the consecutive number start from the number that the pollster places, but in the question “nro_individuo”.
In other words, the initial number of the consecutive number that the pollster places, places it in the question "individual_no", without creating the variable "baseNumber"

I'm not sure if I understand so you want that number to be hardcoded in the form not passed by an enumerator?

Sorry, I don't speak English well.
I want the enumerator to enter the initial number in the question "nro_individuo" and generate a consecutive number from the number that the enumerator entered, that is, without creating the question "baseNumber"

It's not trivial because then you would need nro_individuo to be calculated but not i the first group what is not possible because if a question has calculation it's always calculated.

Understood, thanks for the explanation.
Could it be otherwise?
In the Docs I found an example and it works, but without the Begin_group.
prueba plantilla_NO_Begin_group.xlsx (12.2 KB)
But I need it with the Begin_group. When including the Begin_group, the consecutive does not work.
prueba plantilla.xlsx (12.4 KB)

With defaults it is possible but you need to handle that inner group so it should look like:
prueba plantilla.xlsx (9.1 KB)

2 Likes

Thank you very much @Grzesiek2010, this is what I want. With the previous answers, I learned a lot. You're very kind.

1 Like