<?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: Renderer Issue with Null values and Duplicate Symbology Issue when using Multiple Fields in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/renderer-issue-with-null-values-and-duplicate/m-p/1021943#M71565</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;@Anonymous User&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 31 Jan 2021 19:43:06 GMT</pubDate>
    <dc:creator>VenkataSrikanthDasari</dc:creator>
    <dc:date>2021-01-31T19:43:06Z</dc:date>
    <item>
      <title>Renderer Issue with Null values and Duplicate Symbology Issue when using Multiple Fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/renderer-issue-with-null-values-and-duplicate/m-p/1021920#M71562</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1104"&gt;@RobertScheitlin__GISP&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Issue 1&lt;/STRONG&gt;:&amp;nbsp; We created symbology with Status and DeActivated IDC status and hosted this as a map service in ArcGIS Server Manager1. Here are the values for the combination of two fields: 1,&amp;lt;Null&amp;gt;;5,&amp;lt;Null&amp;gt;;30,&amp;lt;Null&amp;gt;,1,N;5,N;30,N&lt;/P&gt;&lt;P&gt;When I am trying to render the layer in 4.x, layer is unable to render 1,&amp;lt;Null&amp;gt; with the blue line and applying the default symbol (&amp;lt;all other values&amp;gt;)&amp;nbsp; i.e. black line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I created renderer object using UniqueValueRenderer replacing &lt;STRONG&gt;"1,&amp;lt;Null&amp;gt;"&lt;/STRONG&gt; with &lt;STRONG&gt;"1, "&amp;nbsp;&lt;/STRONG&gt;and assigned to the Feature layer and it worked.&lt;/P&gt;&lt;P&gt;I wish this layer to load without renderer object in the coming later versions.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VenkataSrikanth_Dasari_4-1612088292159.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4979i6A1D5C8029DC5B25/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VenkataSrikanth_Dasari_4-1612088292159.png" alt="VenkataSrikanth_Dasari_4-1612088292159.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Issue 2:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;After resolving issue1 with renderer object, I am facing issue with the symbology in the legend widget. Please refer the screenshot showing difference between two frameworks for the same layer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both frameworks are using same map service hosted in 10.2 ArcGIS Server Manager.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;3.x&amp;nbsp;&lt;/U&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;U&gt;&amp;nbsp;4.x&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VenkataSrikanth_Dasari_3-1612087733804.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4978i26A4F89E562F6171/image-size/large?v=v2&amp;amp;px=999" role="button" title="VenkataSrikanth_Dasari_3-1612087733804.png" alt="VenkataSrikanth_Dasari_3-1612087733804.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the symbology of the conduit layer in the mxd document. For example, for&amp;nbsp;&lt;STRONG&gt;In Service&lt;/STRONG&gt;&amp;nbsp;(blue) symbol, there are six values with the combination of two fields Status and DeactivatedIDC.&lt;/P&gt;&lt;P&gt;4.x is showing duplicate symbol in the legend widget where as the 3.x version showing unique symbols similar to the mxd below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VenkataSrikanth_Dasari_4-1612088292159.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4979i6A1D5C8029DC5B25/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VenkataSrikanth_Dasari_4-1612088292159.png" alt="VenkataSrikanth_Dasari_4-1612088292159.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would like to generate same output in 3.x and 4.x. Please suggest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Srikanth Dasari&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jan 2021 11:12:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/renderer-issue-with-null-values-and-duplicate/m-p/1021920#M71562</guid>
      <dc:creator>VenkataSrikanthDasari</dc:creator>
      <dc:date>2021-01-31T11:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Renderer Issue with Null values and Duplicate Symbology Issue when using Multiple Fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/renderer-issue-with-null-values-and-duplicate/m-p/1021927#M71563</link>
      <description>&lt;P&gt;The legend will display each value you have listed in the uniqueValueInfos array as individual items so you need to find a way to group those similar items into one.&amp;nbsp; I don't know how you are doing it in your code to change the Nulls to 1, but using a valueExpression in the render, you can created a filter to group the items into one.&amp;nbsp; For example (untested on this dataset):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var renderer = {
    type: "unique-value",  // autocasts as new UniqueValueRenderer()
    valueExpression: "When($feature.Status == 1 &amp;amp;&amp;amp; IsEmpty($feature.DeActivated_IDC), 'In Service', $feature.Status == 5 &amp;amp;&amp;amp; IsEmpty($feature.DeActivated_IDC), 'In Service', $feature.Status == 5 &amp;amp;&amp;amp; IsEmpty($feature.DeActivated_IDC), 'In Service', 'other')",
    defaultSymbol: { type: "simple-marker" },  // autocasts as new SimpleFillSymbol()
    uniqueValueInfos: [{
      // All features with value of "In Service" will be blue
      value: "In Service",
      symbol: {
        type: "simple-line",
        color: "blue"
      }
    }],&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/arcade/function-reference/logical_functions/" target="_self"&gt;Arcade Logical Expressions&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#uniqueValueInfos" target="_self"&gt;valueExpression&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jan 2021 13:53:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/renderer-issue-with-null-values-and-duplicate/m-p/1021927#M71563</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-01-31T13:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Renderer Issue with Null values and Duplicate Symbology Issue when using Multiple Fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/renderer-issue-with-null-values-and-duplicate/m-p/1021943#M71565</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;@Anonymous User&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jan 2021 19:43:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/renderer-issue-with-null-values-and-duplicate/m-p/1021943#M71565</guid>
      <dc:creator>VenkataSrikanthDasari</dc:creator>
      <dc:date>2021-01-31T19:43:06Z</dc:date>
    </item>
  </channel>
</rss>

