<?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: Execution Error:Unnexected[sic] Result querying statistics from layer in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/execution-error-unnexected-sic-result-querying/m-p/1011844#M4103</link>
    <description>&lt;P&gt;the filterStatement looks a bit off, I cant see the current order of the quotes being valid syntax. what are the backslashes doing also (that's maybe just me not using Arcade very much if at all)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;#what you have:
"WoAddress = '" + addy + "' and Description = \'Vehicles - General Repair\'"

#my guess:
"WoAddress = " + addy + " and Description = \'Vehicles - General Repair\'"

#or?

"WoAddress = " + addy + " and Description = 'Vehicles - General Repair'"
&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 22 Dec 2020 19:19:56 GMT</pubDate>
    <dc:creator>DavidPike</dc:creator>
    <dc:date>2020-12-22T19:19:56Z</dc:date>
    <item>
      <title>Execution Error:Unnexected[sic] Result querying statistics from layer</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/execution-error-unnexected-sic-result-querying/m-p/1011836#M4102</link>
      <description>&lt;P&gt;Greetings,&lt;BR /&gt;I am trying to sum all of the features' 'WOCost' fields for a table with a field in common with my popup layer.&lt;/P&gt;&lt;P&gt;if instead of Sum function i run&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Cost = First(FltrFtrs).WoCost&lt;/P&gt;&lt;P&gt;it returns a value. When i run sum (as below) it is throwing error:&lt;/P&gt;&lt;P&gt;var addy = 'UNIT 328 ~ KENWORTH 12 YARD DUMP TRUCK'&lt;BR /&gt;var WOs = FeatureSetByName($map,"Shop Costs",["WOCOST"], False)&lt;BR /&gt;var filterStatement = "WoAddress = '" + addy + "' and Description = \'Vehicles - General Repair\'"&lt;BR /&gt;var FltrFtrs = Filter(WOs, filterStatement)&lt;BR /&gt;var Cnt = Count(FltrFtrs)&lt;BR /&gt;var Cost = 0&lt;BR /&gt;if (Cnt &amp;gt; 0){&lt;BR /&gt;Cost = Sum(FltrFtrs, 'WoCost')&lt;BR /&gt;}else {Cost = 0}&lt;/P&gt;&lt;P&gt;&lt;SPAN class="text-red"&gt;Execution Error:&lt;/SPAN&gt;&lt;SPAN&gt;Unnexected Result querying statistics from layer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 19:03:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/execution-error-unnexected-sic-result-querying/m-p/1011836#M4102</guid>
      <dc:creator>ScottRaznoff12</dc:creator>
      <dc:date>2020-12-22T19:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Execution Error:Unnexected[sic] Result querying statistics from layer</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/execution-error-unnexected-sic-result-querying/m-p/1011844#M4103</link>
      <description>&lt;P&gt;the filterStatement looks a bit off, I cant see the current order of the quotes being valid syntax. what are the backslashes doing also (that's maybe just me not using Arcade very much if at all)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;#what you have:
"WoAddress = '" + addy + "' and Description = \'Vehicles - General Repair\'"

#my guess:
"WoAddress = " + addy + " and Description = \'Vehicles - General Repair\'"

#or?

"WoAddress = " + addy + " and Description = 'Vehicles - General Repair'"
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 22 Dec 2020 19:19:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/execution-error-unnexected-sic-result-querying/m-p/1011844#M4103</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-12-22T19:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Execution Error:Unnexected[sic] Result querying statistics from layer</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/execution-error-unnexected-sic-result-querying/m-p/1011848#M4104</link>
      <description>&lt;P&gt;The backslashes are escape characters to get those single quotes to render as text.&amp;nbsp; i can change the filter statement to something simple or pass the unfiltered feature set and will still return the same result.&amp;nbsp; Also if I return FltrFtrs&lt;/P&gt;&lt;P&gt;i get a feature set result.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 19:25:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/execution-error-unnexected-sic-result-querying/m-p/1011848#M4104</guid>
      <dc:creator>ScottRaznoff12</dc:creator>
      <dc:date>2020-12-22T19:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Execution Error:Unnexected[sic] Result querying statistics from layer</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/execution-error-unnexected-sic-result-querying/m-p/1011856#M4105</link>
      <description>&lt;P&gt;Ah of course, that's a handy one I've not seen before.&lt;/P&gt;&lt;P&gt;The rest looks fine to me, unless some calculate statistics operation is required on the data before that method can be used?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 19:39:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/execution-error-unnexected-sic-result-querying/m-p/1011856#M4105</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-12-22T19:39:17Z</dc:date>
    </item>
  </channel>
</rss>

