<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Need Help With Survey123 Summary Report Syntax for Dates in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/need-help-with-survey123-summary-report-syntax-for/m-p/1015001#M31830</link>
    <description>&lt;P&gt;Barbara,&lt;/P&gt;&lt;P&gt;I'll send you the XLS form in a direct message!&lt;/P&gt;&lt;P&gt;Thank you so much, I've really been struggling with this one, I'd like to have it wrapped up by Tuesday.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jan 2021 12:06:47 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-01-08T12:06:47Z</dc:date>
    <item>
      <title>Need Help With Survey123 Summary Report Syntax for Dates</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/need-help-with-survey123-summary-report-syntax-for/m-p/1014809#M31813</link>
      <description>&lt;P&gt;&amp;nbsp;I'm working on a summary report for pump station inspections.&amp;nbsp; I'm using a repeat tag to fill out the table which will insert a row for each pump station with it's summed inspection data.&amp;nbsp; I was able to get the syntax correct to sum the data for each question for each individual pump station.&amp;nbsp; But I'm struggling with how to show the most recent inspection date for each pump station.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You'll see in my syntax I tried to use 'stats: max,REPDATE,InsDate' but that gives me the most recent inspection date of ALL the inspections.&amp;nbsp; I only want the most recent inspection date per pump station. I've tried shifting things around, but I keep getting errors and when I don't get an error I get the most recent date overall.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I inserted what I have so far for the report template table below.&lt;/P&gt;&lt;P&gt;$&amp;lt;$summary&amp;gt;&lt;/P&gt;&lt;TABLE width="2345px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="1096px"&gt;&lt;P&gt;&lt;STRONG&gt;Station No.&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="174px"&gt;&lt;P&gt;&lt;STRONG&gt;Last Inspection Date&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="143px"&gt;&lt;P&gt;&lt;STRONG&gt;Pump #1 Run Hours&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="143px"&gt;&lt;P&gt;&lt;STRONG&gt;Pump #2 Run Hours&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="143px"&gt;&lt;P&gt;&lt;STRONG&gt;Total Run Hours&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="93px"&gt;&lt;P&gt;&lt;STRONG&gt;Bioxide Usage in/gals&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="62px"&gt;&lt;P&gt;&lt;STRONG&gt;Fuel Usage in/gals&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="155px"&gt;&lt;P&gt;&lt;STRONG&gt;Generator Run Hours&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="144px"&gt;&lt;P&gt;&lt;STRONG&gt;Electric Usage kWh&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="192px"&gt;&lt;P&gt;&lt;STRONG&gt;Water Usage gals&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="1096px"&gt;&lt;P&gt;${#PumpStationLogs | stats:"count,FACILITYID;&lt;FONT color="#FF0000"&gt;max,REPDATE,InsDate&lt;/FONT&gt;;sum,P1_RNHrs,SumP1;sum,P2_RNHrs,SumP2;sum,BIOXIDE,SumBiox;sum,GENERATOR,SumGen;sum, ELCTMTR_R18,Electric;sum, H2OMTR_R18,SumWater":"PSNAME": "" | where:"1=1" | orderByFields:"PSNAME ASC" }${PSNAME}&lt;/P&gt;&lt;/TD&gt;&lt;TD width="174px"&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;${InsDate | format:"DD/MM/YYY"}&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="143px"&gt;&lt;P&gt;${SumP1|round:2}&lt;/P&gt;&lt;/TD&gt;&lt;TD width="143px"&gt;&lt;P&gt;${SumP2|round:2}&lt;/P&gt;&lt;/TD&gt;&lt;TD width="143px"&gt;&lt;P&gt;${SumP1+SumP2}&lt;/P&gt;&lt;/TD&gt;&lt;TD width="93px"&gt;&lt;P&gt;${SumBiox| round:2}&lt;/P&gt;&lt;/TD&gt;&lt;TD width="62px"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="155px"&gt;&lt;P&gt;${SumGen|round:2}&lt;/P&gt;&lt;/TD&gt;&lt;TD width="144px"&gt;&lt;P&gt;${Electric|round:2}&lt;/P&gt;&lt;/TD&gt;&lt;TD width="192px"&gt;&lt;P&gt;${SumWater|round:2}${/}&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;$&amp;lt;/&amp;gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 19:43:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/need-help-with-survey123-summary-report-syntax-for/m-p/1014809#M31813</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-01-07T19:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help With Survey123 Summary Report Syntax for Dates</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/need-help-with-survey123-summary-report-syntax-for/m-p/1014898#M31821</link>
      <description>&lt;P&gt;Hi Katie,&lt;BR /&gt;&lt;BR /&gt;At first glance I'm not seeing any issues with the syntax here. The only thing I noticed is that the where filter should be before the stats filter, but I don't think that would cause the issue you're seeing. Would you be able to send your XLS form so I can test it a little more?&lt;BR /&gt;&lt;BR /&gt;-Barbara&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 22:28:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/need-help-with-survey123-summary-report-syntax-for/m-p/1014898#M31821</guid>
      <dc:creator>BarbaraWebster1</dc:creator>
      <dc:date>2021-01-07T22:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help With Survey123 Summary Report Syntax for Dates</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/need-help-with-survey123-summary-report-syntax-for/m-p/1015001#M31830</link>
      <description>&lt;P&gt;Barbara,&lt;/P&gt;&lt;P&gt;I'll send you the XLS form in a direct message!&lt;/P&gt;&lt;P&gt;Thank you so much, I've really been struggling with this one, I'd like to have it wrapped up by Tuesday.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 12:06:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/need-help-with-survey123-summary-report-syntax-for/m-p/1015001#M31830</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-01-08T12:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help With Survey123 Summary Report Syntax for Dates</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/need-help-with-survey123-summary-report-syntax-for/m-p/1015660#M31855</link>
      <description>&lt;P&gt;Hi Katie,&lt;BR /&gt;&lt;BR /&gt;Thanks for sending the XLS form. When I test it, it looks like the max,REPDATE,InsDate stats parameter does return the most recent date for each station number, but since the outStatisticsFieldName variable (InsDate) is automatically converted from a date format to a string, there isn't a good way to convert the value from the epoch date format to a human-readable date.&lt;/P&gt;&lt;P&gt;I am logging an enhancement for improving date question handling in the stats filter. If you submit this issue to Esri Support (&lt;A href="https://support.esri.com/" target="_blank"&gt;https://support.esri.com&lt;/A&gt;), they will be able to provide an official enhancement number.&lt;/P&gt;&lt;P&gt;In the meantime, a temporary workaround might be to create a calculate field (with the bind::esri:fieldType set to esriFieldTypeInteger) that formats the date into a YYYYMMDD format. Then you could use the max statistic in the report to find the most recent date based on that field (see screen caps).&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;-Barbara&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pump_station_XLS.JPG" style="width: 756px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/3575iB44AA75D433EA2BB/image-dimensions/756x121?v=v2" width="756" height="121" role="button" title="Pump_station_XLS.JPG" alt="Pump_station_XLS.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pump_station_report_template.JPG" style="width: 651px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/3577i82EBEEFD21E1B936/image-dimensions/651x209?v=v2" width="651" height="209" role="button" title="Pump_station_report_template.JPG" alt="Pump_station_report_template.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 18:21:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/need-help-with-survey123-summary-report-syntax-for/m-p/1015660#M31855</guid>
      <dc:creator>BarbaraWebster1</dc:creator>
      <dc:date>2021-01-11T18:21:43Z</dc:date>
    </item>
  </channel>
</rss>

