I have a 5-level relational database, and am wanting to write reports with a summary section and then the details in repeats. I am completely stumped on how to summarize the area for all of one type of child feature, like repeat1_polygon. The errors are "cannot parse field, field not available in this scope", and such.
I've experimented with the Note on this page "To access questions in a nested repeat,..."which also addresses duplicate layer (or other object, seemingly) names. I've read through the report queries page you reference above, and this blog post by @IsmaelChivite .
In the summary section, I'd like to sum the area for repeat1_poolygon. An individual record an be retrieved by calling ${ Planting_Unit.Planting_Unit_polygon | getValue:"area":"square-meters":"planar"}. A non-geometric field can be accessed by "sum,pop2000,populationTotal" in the stats statement.
$<$summary>
${Planting_Unit ["Planting_Unti.Planting_Unit_polygon" or variants are declared out of scope] | stats:"sum, [[what goes here??]], PU_SumArea"}
$</>
In the summary section, if getValue syntax is inserted into the "outStatistics" portion of the stats format, it breaks the interpreter because of confusion around opening and closing of brackets, as it does with area(${Planting_Unit_polygon}).
Declaring variables, or other such Arcade syntax seems to be not interpreted. I can do this in a popup, it is frustrating to not be able to execute such a summary in a report...
How can I access the area field to sum the area of (in my example) all planting Units on a Restoration Site?
Here is an unanswered question on gis.stackexchange.com for another example of what one might want to pull out of a report. Thanks for any and all help!
https://gis.stackexchange.com/questions/383623/how-to-write-syntax-to-sum-values-for-unique-ids-in-s...