<?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 JS API - potential issue with feature layer and null values in data in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-potential-issue-with-feature-layer-and-null/m-p/68764#M6018</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've downloaded the feature layer hover sample (uses API 3.14) and switched it to use our data.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fjavascript%2Fjssamples%2Ffl_hover.html" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/javascript/jssamples/fl_hover.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The data is being served from ArcGIS Server 10.3.1 running on Windows Server and the data is in ArcSDE 9.3.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data is drains and I want to symbolise it by category using owner and defect status fields.&amp;nbsp; When using unique values from just the owner field it works fine.&amp;nbsp; However when I switched from using one field to two fields not all records display when using a feature layer in my viewer.&amp;nbsp; My testing suggests this is because one of the possible values from the status fields is null.&amp;nbsp; The possible combination of values are shown in the attached doc.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I display the layer using an ArcGIS Dynamic Map Service layer all features display (but the hover functionality requires use of the Feature Layer).&amp;nbsp; However when I switch to a Feature Layer, any records with null as their Status value do not display and are not highlighted when I hover over them.&amp;nbsp; It does not make a difference whether the field that has null values is used in the info popup.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have come up with 2 workarounds for this:&lt;/P&gt;&lt;P&gt;1) Replace all null values with something else (e.g. "OK" in this example).&lt;/P&gt;&lt;P&gt;2) Use the "All other values" option in the layer properties.&lt;/P&gt;&lt;P&gt;Depending on the circumstances one or both of these workarounds may not be practical.&lt;/P&gt;&lt;P&gt;In this example we are aiming to have the defect status in a table which is joined to the drain layer (possibly in a view).&amp;nbsp; Ideally the defect table would only contain records for drains with open or recently fixed problems, not all drains (there are 160,000!).&amp;nbsp; I can modify the Status field value in the view so that for records with null is returns a Status of "OK" but this will add an overhead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Nov 2015 13:45:36 GMT</pubDate>
    <dc:creator>TimWood</dc:creator>
    <dc:date>2015-11-12T13:45:36Z</dc:date>
    <item>
      <title>JS API - potential issue with feature layer and null values in data</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-potential-issue-with-feature-layer-and-null/m-p/68764#M6018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've downloaded the feature layer hover sample (uses API 3.14) and switched it to use our data.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fjavascript%2Fjssamples%2Ffl_hover.html" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/javascript/jssamples/fl_hover.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The data is being served from ArcGIS Server 10.3.1 running on Windows Server and the data is in ArcSDE 9.3.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data is drains and I want to symbolise it by category using owner and defect status fields.&amp;nbsp; When using unique values from just the owner field it works fine.&amp;nbsp; However when I switched from using one field to two fields not all records display when using a feature layer in my viewer.&amp;nbsp; My testing suggests this is because one of the possible values from the status fields is null.&amp;nbsp; The possible combination of values are shown in the attached doc.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I display the layer using an ArcGIS Dynamic Map Service layer all features display (but the hover functionality requires use of the Feature Layer).&amp;nbsp; However when I switch to a Feature Layer, any records with null as their Status value do not display and are not highlighted when I hover over them.&amp;nbsp; It does not make a difference whether the field that has null values is used in the info popup.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have come up with 2 workarounds for this:&lt;/P&gt;&lt;P&gt;1) Replace all null values with something else (e.g. "OK" in this example).&lt;/P&gt;&lt;P&gt;2) Use the "All other values" option in the layer properties.&lt;/P&gt;&lt;P&gt;Depending on the circumstances one or both of these workarounds may not be practical.&lt;/P&gt;&lt;P&gt;In this example we are aiming to have the defect status in a table which is joined to the drain layer (possibly in a view).&amp;nbsp; Ideally the defect table would only contain records for drains with open or recently fixed problems, not all drains (there are 160,000!).&amp;nbsp; I can modify the Status field value in the view so that for records with null is returns a Status of "OK" but this will add an overhead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 13:45:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-potential-issue-with-feature-layer-and-null/m-p/68764#M6018</guid>
      <dc:creator>TimWood</dc:creator>
      <dc:date>2015-11-12T13:45:36Z</dc:date>
    </item>
  </channel>
</rss>

