<?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: Empty featureset in arcade in dashboard in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/empty-featureset-in-arcade-in-dashboard/m-p/1064037#M40366</link>
    <description>&lt;P&gt;This appears to be a problem when filtering by GlobalID. If you put in a filter clause on a field that returns no values (like "var filter = Filter(fs, 'objectid = 0')"), the filter count is 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Jun 2021 13:04:13 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2021-06-02T13:04:13Z</dc:date>
    <item>
      <title>Empty featureset in arcade in dashboard</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/empty-featureset-in-arcade-in-dashboard/m-p/1064000#M40364</link>
      <description>&lt;P&gt;I am trying to create a pie chart in dashboard using arcade.&lt;/P&gt;&lt;P&gt;I am query a layer by a list of values and create some values for the pie.&lt;/P&gt;&lt;P&gt;The basic lines is&lt;/P&gt;&lt;P&gt;&amp;nbsp;var sql = "GlobalID = '" + globalId + "'";&lt;BR /&gt;var featureLocation = Filter(fs_location, sql);&lt;/P&gt;&lt;P&gt;where the golbalID change in a loop.&lt;/P&gt;&lt;P&gt;It all works fine when the feature set contain values. The problem is when it return nothing.&lt;/P&gt;&lt;P&gt;I tried "isEmpty(featureLocation)" but it return an error.&lt;/P&gt;&lt;P&gt;I tried some simple loop:&lt;/P&gt;&lt;P&gt;var c = 0&lt;BR /&gt;for(var s in featureLocation)&lt;BR /&gt;{&lt;BR /&gt;c = c + 1&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;it return an error too.&lt;/P&gt;&lt;P&gt;Unlike many of the examples I do not have $feature here.&lt;/P&gt;&lt;P&gt;Any good way to understand nothing is coming back and does not get an error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 11:23:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/empty-featureset-in-arcade-in-dashboard/m-p/1064000#M40364</guid>
      <dc:creator>mody_buchbinder</dc:creator>
      <dc:date>2021-06-02T11:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Empty featureset in arcade in dashboard</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/empty-featureset-in-arcade-in-dashboard/m-p/1064005#M40365</link>
      <description>&lt;P&gt;If you expand the tollbar in the comment box, you can insert code samples:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_0-1622633201561.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/14819iF03E38AD777CCAE4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_0-1622633201561.png" alt="JohannesLindner_0-1622633201561.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if(Count(featureLocation) == 0) {
  // noting found, return null
  return null
}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 02 Jun 2021 11:28:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/empty-featureset-in-arcade-in-dashboard/m-p/1064005#M40365</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2021-06-02T11:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Empty featureset in arcade in dashboard</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/empty-featureset-in-arcade-in-dashboard/m-p/1064037#M40366</link>
      <description>&lt;P&gt;This appears to be a problem when filtering by GlobalID. If you put in a filter clause on a field that returns no values (like "var filter = Filter(fs, 'objectid = 0')"), the filter count is 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 13:04:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/empty-featureset-in-arcade-in-dashboard/m-p/1064037#M40366</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-06-02T13:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Empty featureset in arcade in dashboard</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/empty-featureset-in-arcade-in-dashboard/m-p/1064487#M40390</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I found out that when the globalID is empty you get an error.&lt;/P&gt;&lt;P&gt;Still the expression &lt;SPAN&gt;GlobalID = '' is valid but any reference to the featureSet it returns (including Count) return an error.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 05:03:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/empty-featureset-in-arcade-in-dashboard/m-p/1064487#M40390</guid>
      <dc:creator>mody_buchbinder</dc:creator>
      <dc:date>2021-06-03T05:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Empty featureset in arcade in dashboard</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/empty-featureset-in-arcade-in-dashboard/m-p/1064509#M40391</link>
      <description>&lt;P&gt;Have you tried checking for null?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if(featureLocation == null || Count(featureLocation) == 0) {
  // noting found, return null
  return null
}&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 03 Jun 2021 06:18:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/empty-featureset-in-arcade-in-dashboard/m-p/1064509#M40391</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2021-06-03T06:18:08Z</dc:date>
    </item>
  </channel>
</rss>

