So, I’m finally getting the hang of some aspects of generating Survey 123 reports, but there are a couple of items still eluding me. Any help appreciated.
Summarizing repeat areas or lengths based on geometry
If I have a field that I calculate area or length into, I can summarize on that field with a stats function. If I am listing the number of rows in a repeat, I can calculate the area from a getValue function. But I cannot figure out the syntax to summarize the area or length for all repeats based on geometry.
Rounding values or formatting dates derived from the stats function
I’d like help on how to format the output of the stats function to get date formatting and round to a decimal place.
Sorting repeats
If I am generating a listing of all rows in a repeat, how do I control the order in which it is displayed?
Desired output:


Current template:
$<$summary>
Revegetation and Monitoring Site Report
Site Features Summary
Feature | Count | Total Acres |
Planting Units | Get value count: ${Planting_Unit | getValue:"count"} Stats count: ${Planting_Unit | stats: “count, objectid”} | ${Planting_Unit | stats: “sum,Acres_Planting_Unit”} |
Invasive Vegetation Units | ${Invasive_Vegetation_Unit | stats: “count, objectid”} | Sum the area in acres based on geometry. |
Observation Units | ${Observation_Unit | stats: “count, objectid”} | Sum the area in acres based on geometry. |
Monitoring Events Summary
Event | Count | Most Recent Event |
Planting Unit Monitoring Event | ${MonitoringEvent_PlantingUnit | stats: “count, objectid”} | ${MonitoringEvent_PlantingUnit | stats: “first, Date_Unit_Monitored_PUME” | orderByFields:"Date_Unit_Monitored_PUME DESC”} |
Invasive Veg Monitoring Events | ${MonitoringEvent_Invasive_Veg | stats: “count, objectid”} | Show the most recent monitoring event date. |
$</>
Planting Units
IV Unit ID | Note | Acres |
${#Planting_Unit} ${Planting_Unit_ID} | ${Planting_Unit_Note} | ${Planting_Unit_polygon | getValue:"area":"acres":"geodesic"} ${/} |
Invasive Vegetation Units
IV Unit ID | Cover Ratio | Acres |
${#Invasive_Vegetation_Unit} ${objectid} | ${Invasive_Veg_CoverRatio_IVU_ | getValue:""} | ${Invasive_Veg_Unit_polygon | getValue:"area":"acres":"geodesic"} ${/} |
Planting Unit Monitoring Event
Planting Unit Monitoring Event ID | Survival Rate | Acres |
${#MonitoringEvent_PlantingUnit} ${Planting_Unit_ME_ID} | ${Survival_Rate_PUME | getValue:""} | ${Date_Unit_Monitored_PUME} ${/} |