<?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 Why don't all Arcade expressions work for Attribute-Driven Symbology? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/why-don-t-all-arcade-expressions-work-for/m-p/332525#M14463</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been trying to make bi- and multivariate maps on ArcGIS Pro to achieve effects similar to the smart mapping capabilities available on AGOL. For example, after allowing symbol property connections, I wrote the following&amp;nbsp;code on the Expression Builder to change symbol fill colors depending on value ranges. I got no errors, but no colors were rendered:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P dir="ltr" style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;var chg = ((($feature.Idx2018/1000) - &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;$feature.Idx2016)/$feature.Idx2016)*100; //calculate the percent change&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;var brks = [-25,-10,0,15,35,70,155]; //define class breaks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;var clrPlt = [ //8 digit hex codes for each class&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; "#A8380090",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; "#CD655590",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; "#EC8D6D90",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; "#F5F5F590",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; "#BED6BE90",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; "#7ECDAC90",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; "#01857190"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; ];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;When(chg &amp;lt; brks[0],clrPlt[0], //colors are returned when condition is true&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= brks[0] &amp;amp;&amp;amp; chg &amp;lt; brks[1]),clrPlt[1],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= brks[1] &amp;amp;&amp;amp; chg &amp;lt; brks[2]),clrPlt[2],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= brks[2] &amp;amp;&amp;amp; chg &amp;lt; brks[3]),clrPlt[3],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= brks[3] &amp;amp;&amp;amp; chg &amp;lt; brks[4]),clrPlt[4],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= brks[4] &amp;amp;&amp;amp; chg &amp;lt; brks[5]),clrPlt[5],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= brks[5] &amp;amp;&amp;amp; chg &amp;lt; brks[6]),clrPlt[6],"#FFFFFF90"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After a lot of trials, I managed to get the result I wanted after "hard-coding" the color codes and the class breaks (the symbols below were being drawn with a single hue):&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;var chg = ((($feature.Idx2018/1000) -&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;$feature.Idx2016)/$feature.Idx2016)*100; //calculate the percent change&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;When(chg &amp;lt; -25,"#A83800",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= -25 &amp;amp;&amp;amp; chg &amp;lt; -10),'#CD6555',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= -10 &amp;amp;&amp;amp; chg &amp;lt; 0),'#EC8D6D',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= 0 &amp;amp;&amp;amp; chg &amp;lt; 15),'#F5F5F5',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= 15 &amp;amp;&amp;amp; chg &amp;lt; 35),'#BED6BE',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= 35 &amp;amp;&amp;amp; chg &amp;lt; 70),'#7ECDAC',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= 70 &amp;amp;&amp;amp; chg &amp;lt; 160),'#018571',"#000"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;&lt;IMG __jive_id="422452" class="image-1 jive-image" height="167" src="https://community.esri.com/legacyfs/online/422452_pastedImage_13.png" width="104" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Why is this happening? I think that for a lot of people, code blocks such as the one at the top of this description would be easier to maintain, if code reused consistently. I also tried doing this with if statements, one condition at a time; but it was rejected when comparing to a negative value... also something strange, as if Arcade was doing computations with a few random values to define whether conditions are true or not prior to running the whole thing. This last statement, of course &lt;STRONG&gt;is just an assumption&lt;/STRONG&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would like to hear if indeed, there are issues with the language that must be fixed, or if I missed something.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Sep 2018 19:00:22 GMT</pubDate>
    <dc:creator>NoeLandaverde</dc:creator>
    <dc:date>2018-09-19T19:00:22Z</dc:date>
    <item>
      <title>Why don't all Arcade expressions work for Attribute-Driven Symbology?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/why-don-t-all-arcade-expressions-work-for/m-p/332525#M14463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been trying to make bi- and multivariate maps on ArcGIS Pro to achieve effects similar to the smart mapping capabilities available on AGOL. For example, after allowing symbol property connections, I wrote the following&amp;nbsp;code on the Expression Builder to change symbol fill colors depending on value ranges. I got no errors, but no colors were rendered:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P dir="ltr" style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;var chg = ((($feature.Idx2018/1000) - &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;$feature.Idx2016)/$feature.Idx2016)*100; //calculate the percent change&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;var brks = [-25,-10,0,15,35,70,155]; //define class breaks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;var clrPlt = [ //8 digit hex codes for each class&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; "#A8380090",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; "#CD655590",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; "#EC8D6D90",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; "#F5F5F590",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; "#BED6BE90",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; "#7ECDAC90",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; "#01857190"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; ];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;When(chg &amp;lt; brks[0],clrPlt[0], //colors are returned when condition is true&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= brks[0] &amp;amp;&amp;amp; chg &amp;lt; brks[1]),clrPlt[1],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= brks[1] &amp;amp;&amp;amp; chg &amp;lt; brks[2]),clrPlt[2],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= brks[2] &amp;amp;&amp;amp; chg &amp;lt; brks[3]),clrPlt[3],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= brks[3] &amp;amp;&amp;amp; chg &amp;lt; brks[4]),clrPlt[4],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= brks[4] &amp;amp;&amp;amp; chg &amp;lt; brks[5]),clrPlt[5],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= brks[5] &amp;amp;&amp;amp; chg &amp;lt; brks[6]),clrPlt[6],"#FFFFFF90"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After a lot of trials, I managed to get the result I wanted after "hard-coding" the color codes and the class breaks (the symbols below were being drawn with a single hue):&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;var chg = ((($feature.Idx2018/1000) -&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;$feature.Idx2016)/$feature.Idx2016)*100; //calculate the percent change&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;When(chg &amp;lt; -25,"#A83800",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= -25 &amp;amp;&amp;amp; chg &amp;lt; -10),'#CD6555',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= -10 &amp;amp;&amp;amp; chg &amp;lt; 0),'#EC8D6D',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= 0 &amp;amp;&amp;amp; chg &amp;lt; 15),'#F5F5F5',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= 15 &amp;amp;&amp;amp; chg &amp;lt; 35),'#BED6BE',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= 35 &amp;amp;&amp;amp; chg &amp;lt; 70),'#7ECDAC',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; (chg &amp;gt;= 70 &amp;amp;&amp;amp; chg &amp;lt; 160),'#018571',"#000"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;&lt;IMG __jive_id="422452" class="image-1 jive-image" height="167" src="https://community.esri.com/legacyfs/online/422452_pastedImage_13.png" width="104" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Why is this happening? I think that for a lot of people, code blocks such as the one at the top of this description would be easier to maintain, if code reused consistently. I also tried doing this with if statements, one condition at a time; but it was rejected when comparing to a negative value... also something strange, as if Arcade was doing computations with a few random values to define whether conditions are true or not prior to running the whole thing. This last statement, of course &lt;STRONG&gt;is just an assumption&lt;/STRONG&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would like to hear if indeed, there are issues with the language that must be fixed, or if I missed something.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2018 19:00:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/why-don-t-all-arcade-expressions-work-for/m-p/332525#M14463</guid>
      <dc:creator>NoeLandaverde</dc:creator>
      <dc:date>2018-09-19T19:00:22Z</dc:date>
    </item>
  </channel>
</rss>

