Hello fellow survey123 leveragers. I have a need to create a report from a survey which I imagine will need to include some combination of a summary and repeat section.
Here is the survey123 layer name and the corresponding fields from my survey that will be used for the report:
Layer: ${#Yard_Operations}
Fields:
${date_visited}
${yard}
${fed}
Ideally, a very simple version the report will look something like:
Yard | Fed |
210 | 5/59/22 |
211 |
In the above, the yard column would pull all unique (as there can be multiple submissions per yard) uhb_yard values, and the fed column would pull a statistic (max) of the date_visited field based on the query: where fed = 'yes.' Blanks would indicate there have been no submissions for that yard where fed='yes.'
Any help is appreciated, even confirming that this is not possible so that I may stop pursing is great. Once/if I figure this out I would like to add more columns to the report with other yes/no questions with dates on them. Thank you in advance!
Hi @RodrigoLopez ,
Something like below may help. The syntax for the stats part is stats: "<statisticType,statsField,outFieldName>":"<groupByField>":"<havingClause>", where havingClause is left empty (but need to present) at this time. Please see https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereportqueries.htm for details.
Yard | Fed |
${#Yard_Operations | where:”1=1” | stats:”max,date_visited,latestVisit”:”yard”:”” | orderByFields:”yard ASC” } | ${latestVisit}${/} |