Is it possible to, say, return the value of a field in the 2nd repeat?
This page is not showing me anything helpful in this case, Repeat expressions—ArcGIS Survey123 | Documentation
Neither is Google.
Thanks!
Within your survey you can pull the value from the second repeat into the parent layer and then reference that in your report.
I do not want to do that.
Use case here is:
Inspection can be at one or more sites (repeat). The results of all the sites are accumulated into summary fields ranking their answers. (E.g., if one location was Bad, the entire inspection is Bad).
In the report, I have a summary page, followed by pages for the repeats.
Page 1 | summary page |
Page 2 | repeat1 |
Page 3 | repeat2 |
If there was only one inspection site, then there is no need for the repeats and we can just use the summary.
HOWEVER.
The summary page is only showing the results of select_one/multiple questions. What I'm aiming to do here is pull in the other fields from the first repeat record if and only if there is only one repeat record.
${summaryquestion1} ${if(repeat1 | getValue:"count")==1} ${repeat1.question1.} ${/} |
Idk if that makes sense or not.
My ultimate resort here would be to double up on the summary page with the cumulative stuff and a copy of the repeat stuff, but make it so one only shows up if the repeat count is >1. This seems kind of horrible and something I'd only want to do as the finishing touch, because now I'd have to make changes in two places instead of one, if I needed to make them.
Page 1 | ${if (repeat1 | getValue: "count")>1} ${summaryquestion1} ${/}${if (repeat1 | getValue: "count")==1} ${#repeat1} ${question1} ${/} ${/} |
Page 2 | ${if (repeat1 | getValue: "count")>1} ${#repeat1} ${question1} ${/} ${/} |
Thinking aloud here, I could maybe cheat a bit more cleanly by just opening a repeat conditionally?
${summaryquestion1} ${if(repeat1 | getValue:"count")==1} ${#repeat1}${.question1.} ${/} ${/} |
S123 Connect is currently freezing on "Updating survey form package" and the S123 website won't let me save a new template, so I think I'm going to have to test this tomorrow and report back.