<?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: ClassBreaksRenderer Dynamic field property? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/classbreaksrenderer-dynamic-field-property/m-p/560074#M52245</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try using `DefaultValue`, which is a logical expression in Arcade.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H3 style="color: #4c4c4c; background-color: #ffffff; font-size: 1.69949rem; margin: 0px 0px 0.75rem;"&gt;DefaultValue&lt;/H3&gt;&lt;H5 style="color: #4c4c4c; background-color: #ffffff; font-size: 1.2019rem; margin: 0px 0px 0.75rem;"&gt;DefaultValue( value, defaultValue? ) -&amp;gt; returns:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="color: #595959; background-color: #f8f8f8; border: 1px solid #efefef; font-size: 0.875em;"&gt;*&lt;/CODE&gt;&lt;/H5&gt;&lt;P style="color: #4c4c4c; background-color: #ffffff; margin-bottom: 1.5rem;"&gt;Replaces an empty value with a provided default value.&lt;/P&gt;&lt;TABLE style="color: #4c4c4c; background-color: #ffffff; border: 1px solid #cccccc; font-size: 0.875rem; margin-bottom: 1.5rem;"&gt;&lt;THEAD style="background-color: #efefef; border-bottom: 1px solid #cccccc; font-size: 1rem;"&gt;&lt;TR style="border-bottom: none;"&gt;&lt;TH style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;Name&lt;/TH&gt;&lt;TH style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;Type&lt;/TH&gt;&lt;TH style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;Description&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR style="border-bottom: 1px solid #cccccc;"&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;value&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;*&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;The input value to compare against&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="color: #595959; background-color: #f8f8f8; border: 1px solid #efefef; font-size: 0.875em;"&gt;null&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="color: #595959; background-color: #f8f8f8; border: 1px solid #efefef; font-size: 0.875em;"&gt;''&lt;/CODE&gt;. This may be a value of any type. However, if this value is an empty array, then the empty array will be returned.&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border-bottom: none;"&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;defaultValue&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;*&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;&lt;CODE style="color: #595959; background-color: #f8f8f8; border: 1px solid #efefef; font-size: 0.875em;"&gt;optional&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Return this value if the provided&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="color: #595959; background-color: #f8f8f8; border: 1px solid #efefef; font-size: 0.875em;"&gt;value&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is empty. This may be a value of any type.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/arcade/function-reference/logical_functions/"&gt;https://developers.arcgis.com/arcade/function-reference/logical_functions/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using&amp;nbsp;&lt;SPAN&gt;DefaultValue in a 4x sample for labeling&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=symbols-points-3d"&gt;https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=symbols-points-3d&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Jul 2019 18:34:11 GMT</pubDate>
    <dc:creator>Noah-Sager</dc:creator>
    <dc:date>2019-07-23T18:34:11Z</dc:date>
    <item>
      <title>ClassBreaksRenderer Dynamic field property?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/classbreaksrenderer-dynamic-field-property/m-p/560073#M52244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are&amp;nbsp;in the process of&amp;nbsp;migrating from ESRI JS 3.28 to 4.12, and I am trying to determine how one can dynamically set the ClassBreaksRenderer field attribute?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance, given the field attribute docs as an example (see below), assume that in the absence of the “&lt;SPAN style="color: #c41a16; background-color: #f8f8f8;"&gt;totalAcres”&lt;/SPAN&gt;&amp;nbsp;property’s having a value, how can I fallback to another attribute on the feature, say, “&lt;SPAN style="color: #c41a16; background-color: #f8f8f8;"&gt;totalAcres2”&lt;/SPAN&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#field" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#field"&gt;ClassBreaksRenderer | ArcGIS API for JavaScript 4.12&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a simple way to accomplish this? The field attribute&amp;nbsp;is of type string and so I can’t seem to find an alternative. I’ve explored using Arcade expressions but feel there must be an easier way to specify which field&amp;nbsp;to use at runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2019 03:29:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/classbreaksrenderer-dynamic-field-property/m-p/560073#M52244</guid>
      <dc:creator>EricFeminella</dc:creator>
      <dc:date>2019-07-23T03:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: ClassBreaksRenderer Dynamic field property?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/classbreaksrenderer-dynamic-field-property/m-p/560074#M52245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try using `DefaultValue`, which is a logical expression in Arcade.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H3 style="color: #4c4c4c; background-color: #ffffff; font-size: 1.69949rem; margin: 0px 0px 0.75rem;"&gt;DefaultValue&lt;/H3&gt;&lt;H5 style="color: #4c4c4c; background-color: #ffffff; font-size: 1.2019rem; margin: 0px 0px 0.75rem;"&gt;DefaultValue( value, defaultValue? ) -&amp;gt; returns:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="color: #595959; background-color: #f8f8f8; border: 1px solid #efefef; font-size: 0.875em;"&gt;*&lt;/CODE&gt;&lt;/H5&gt;&lt;P style="color: #4c4c4c; background-color: #ffffff; margin-bottom: 1.5rem;"&gt;Replaces an empty value with a provided default value.&lt;/P&gt;&lt;TABLE style="color: #4c4c4c; background-color: #ffffff; border: 1px solid #cccccc; font-size: 0.875rem; margin-bottom: 1.5rem;"&gt;&lt;THEAD style="background-color: #efefef; border-bottom: 1px solid #cccccc; font-size: 1rem;"&gt;&lt;TR style="border-bottom: none;"&gt;&lt;TH style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;Name&lt;/TH&gt;&lt;TH style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;Type&lt;/TH&gt;&lt;TH style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;Description&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR style="border-bottom: 1px solid #cccccc;"&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;value&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;*&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;The input value to compare against&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="color: #595959; background-color: #f8f8f8; border: 1px solid #efefef; font-size: 0.875em;"&gt;null&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="color: #595959; background-color: #f8f8f8; border: 1px solid #efefef; font-size: 0.875em;"&gt;''&lt;/CODE&gt;. This may be a value of any type. However, if this value is an empty array, then the empty array will be returned.&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border-bottom: none;"&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;defaultValue&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;*&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.5rem;"&gt;&lt;CODE style="color: #595959; background-color: #f8f8f8; border: 1px solid #efefef; font-size: 0.875em;"&gt;optional&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Return this value if the provided&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="color: #595959; background-color: #f8f8f8; border: 1px solid #efefef; font-size: 0.875em;"&gt;value&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is empty. This may be a value of any type.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/arcade/function-reference/logical_functions/"&gt;https://developers.arcgis.com/arcade/function-reference/logical_functions/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using&amp;nbsp;&lt;SPAN&gt;DefaultValue in a 4x sample for labeling&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=symbols-points-3d"&gt;https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=symbols-points-3d&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2019 18:34:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/classbreaksrenderer-dynamic-field-property/m-p/560074#M52245</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2019-07-23T18:34:11Z</dc:date>
    </item>
  </channel>
</rss>

