Select to view content in your preferred language

Limit the number of records to show from a table in a survey123 report.

746
1
Jump to solution
06-20-2023 12:12 PM
FrankDay
Occasional Contributor

My report shows annual test results for different locations. Test results are stored in a relationship table. I want the report to only show the last 2 years' tests. I have attached a copy of the report after being created by Survey123 and a copy of the document used to create the form. 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
IsmaelChivite
Esri Notable Contributor

In your report template, try replacing

${#BACKFLOWTESTRESULTS}

with

${#BACKFLOWTESTRESULTS | where: "TESTDATE BETWEEN CURRENT_TIMESTAMP - 730 AND CURRENT_TIMESTAMP" | orderByFields:" TESTDATE DESC"}

More on this here: https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereportqueries.htm 

View solution in original post

1 Reply
IsmaelChivite
Esri Notable Contributor

In your report template, try replacing

${#BACKFLOWTESTRESULTS}

with

${#BACKFLOWTESTRESULTS | where: "TESTDATE BETWEEN CURRENT_TIMESTAMP - 730 AND CURRENT_TIMESTAMP" | orderByFields:" TESTDATE DESC"}

More on this here: https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereportqueries.htm