Auto Increment integer using Survey123

20891
31
Jump to solution
02-02-2016 10:17 AM
RhondaThynne
New Contributor III

Would it be possible to auto increment an integer field (within a Repeat) calculated from the previous entry; on the same field?

For example: during our fish surveys we can catch up to 30 fish at one site. Each fish needs be be measured and weighed and have a Fish Number.  The first fish caught would be "1", second fish "2", third fish "3" etc.

So, it would be fantastic (within a Repeat) after the first fish information is entered, the survey form would auto-populate the Fish Number field with "2" and so on.

I understand there are still some bugs with Repeat's but just wondering if this would be a possibility down the road!! Even if this could be accomplished outside of a repeat, it would still be useful!!

Thank you

31 Replies
LMedeirosUI
Occasional Contributor

EDITED - for some reason the "once" does not work anymore. I swear I tested it, but my testers said it only worked for the second record (that is, the first record always ended up being "prefix-0001", even when you entered in a starting number of 29 (or whatever). I removed the once function and it went back to working as expected. This does leave some room for errors being made as users scroll back and forth and change the start number.

Heena1
by
New Contributor III

Thank you. I have to use ID format with prefix. This is very helpful!

0 Kudos