Select to view content in your preferred language

Reference a select_one answer that occurs within a repeat outside of the repeat

46
1
yesterday
Jonatanson_DUC
New Contributor

Hi everyone!

I'm creating a ground cover identification form that contains two repeats.

The first requires the surveyor to select different ground cover types (vegetation, bare ground, water, etc.) then input their percent cover of a 1m by 1m plot.  At the end of this repeat is a box which sums the entered percentages in real time so the surveyor knows when they've reached 100%.  I've also inserted a group with two notes to display each ground cover type and percentage so the user knows what they've entered so far.

The second repeat is functioning similarly, except instead of needing to reach 100%, it needs to reach the percentage entered for the vegetation ground cover type from the repeat above.

I'm pretty lost on how to accomplish this or if it's even possible.  Does anyone have experience referencing repeat answers outside of a repeat?  Any help is appreciated!

0 Kudos
1 Reply
Neal-Kittelson
Occasional Contributor

Your box summing the percentage is outside the repeat correct?  If so, there are aggregation functions for repeats to accomplish what you are trying to do:

https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-repeats/ba-p/89804...

Your second repeat will probably require some hidden calculation fields inside the repeat to summarize the individual ground cover type with some if statements to filter your sums

inside the repeat: type: hidden name: bareground      calculation:if(selected(${type},"bare ground"),${percent},"")   bind:: int

outside the repeat:    type: note  calculation: sum(${bareground})

 

0 Kudos