Number each repeat

1122
1
06-07-2020 07:44 AM
BenSmith6
New Contributor III

I'm designing a form (advanced XLSForm in Survey123 Connect) where there will always be 10 repeats. A Value needs to be calcualted for each repeat. The first repeat, repeat1, uses formula1. The second, repeat2, uses formula2, etc through to repeat10 needing to use formula10.

As it stands, my mehtodology requires 10 different child tables, and I'd prefer it to be one for obvious reasons.

I am aware I could have the field guys simply manual select which repeat it is, but this seems inefficient and risks further human error.

Essentially, I want repeat1 to have a field with "1" in it, then for repeat2 to populate the same field with "2", through to 10. With my thought being I can use an external csv to ascertain and use the right formula.

Tags (2)
0 Kudos
1 Reply
DougBrowning
MVP Esteemed Contributor

Yes you can number the repeat using once(count(somenumberfield)). Then set repeat_count to 10.

See this post  https://community.esri.com/message/787003-re-survey123-functionality-calculate-position-in-repeat-gr...

I also then use that number to do a lookup using pulldata as you said.  I have never tried to pull a formula though.

I did

1 A

2 B

etc to auto label by letter.

Hope that helps.

0 Kudos