<?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: Arcade formula to show response time in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-formula-to-show-response-time/m-p/1002171#M4034</link>
    <description>&lt;P&gt;The data sits in a&amp;nbsp;&lt;SPAN&gt;Hosted Feature Layer and is maintained via a Web Mapping Application&amp;nbsp;created using ArcGIS Web App Builder (currently no Edit Widget available in Web Experience Builder).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As this is my first attempt at a dashboard I'm on a learning curve at the moment.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I was hoping this would maybe be a simple bit of code however this possibly looks more complex &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2020 15:49:48 GMT</pubDate>
    <dc:creator>CMcDonald</dc:creator>
    <dc:date>2020-11-17T15:49:48Z</dc:date>
    <item>
      <title>Arcade formula to show response time</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-formula-to-show-response-time/m-p/1002102#M4032</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;is it possible to show the average response time on an ArcGIS Dashboard?&lt;/P&gt;&lt;P&gt;I have created a Hosted Feature Layer and there are two date type fields called &lt;STRONG&gt;Rep_Time&lt;/STRONG&gt; (this is the Reported Date &amp;amp; Time) and&amp;nbsp;&lt;STRONG&gt;Res_Time&lt;/STRONG&gt;&amp;nbsp;(this is the Response Date &amp;amp; Time).&lt;/P&gt;&lt;P&gt;What I would like to have is an Indicator Element displaying this in hours and minutes.&lt;/P&gt;&lt;P&gt;I found this post helpful&amp;nbsp;&lt;A href="https://www.esri.com/arcgis-blog/products/ops-dashboard/real-time/displaying-time-spans-with-arcade-in-dashboards/" target="_blank" rel="noopener"&gt;https://www.esri.com/arcgis-blog/products/ops-dashboard/real-time/displaying-time-spans-with-arcade-in-dashboards/&lt;/A&gt;&amp;nbsp;but too complicated for me I am afraid.&lt;/P&gt;&lt;P&gt;My Arcade expression looks like this (which even if it did work would probably only display seconds?)&lt;/P&gt;&lt;P&gt;var dateopened = $datapoint[&lt;FONT color="#FF0000"&gt;"Rep_Time"&lt;/FONT&gt;];&lt;BR /&gt;var datecleared = $datapoint[&lt;FONT color="#FF0000"&gt;"Res_Time"&lt;/FONT&gt;];&lt;BR /&gt;var secondsToRespond = $DateDiff(dateCleared, dateOpened, &lt;FONT color="#FF0000"&gt;'seconds'&lt;/FONT&gt;);&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 11:44:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-formula-to-show-response-time/m-p/1002102#M4032</guid>
      <dc:creator>CMcDonald</dc:creator>
      <dc:date>2020-11-17T11:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade formula to show response time</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-formula-to-show-response-time/m-p/1002118#M4033</link>
      <description>&lt;P&gt;Unless I'm mistaken, in the Dashboards Beta, you can only apply Arcade to the &lt;STRONG&gt;List&lt;/STRONG&gt; item, and only on a per-feature basis.&lt;/P&gt;&lt;P&gt;Getting an aggregate such as an average requires that there be a &lt;EM&gt;numeric&lt;/EM&gt; field to work with. You already have your arcade expression written, but what you'll need to do is add a new&amp;nbsp;&lt;STRONG&gt;secondsToRespond&lt;/STRONG&gt; field to the layer and then use that expression in the field calculator to populate it with values.&lt;/P&gt;&lt;P&gt;With a numeric field in the data, an indicator can access that and average it, and even apply a value conversion to show the response time in minutes or hours.&lt;/P&gt;&lt;P&gt;This does unfortunately require manually updating this field regularly to ensure that there is data in the new field. This would be simple enough to automate with the ArcGIS Python API. Where is the data coming from, by the way? There are ways to get an attribute to calculate upon submission via Survey123 as well, if that's an option for you.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 13:22:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-formula-to-show-response-time/m-p/1002118#M4033</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2020-11-17T13:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade formula to show response time</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-formula-to-show-response-time/m-p/1002171#M4034</link>
      <description>&lt;P&gt;The data sits in a&amp;nbsp;&lt;SPAN&gt;Hosted Feature Layer and is maintained via a Web Mapping Application&amp;nbsp;created using ArcGIS Web App Builder (currently no Edit Widget available in Web Experience Builder).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As this is my first attempt at a dashboard I'm on a learning curve at the moment.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I was hoping this would maybe be a simple bit of code however this possibly looks more complex &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 15:49:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-formula-to-show-response-time/m-p/1002171#M4034</guid>
      <dc:creator>CMcDonald</dc:creator>
      <dc:date>2020-11-17T15:49:48Z</dc:date>
    </item>
  </channel>
</rss>

