<?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: Using Arcade to color code a polygon layer based on attribute values    in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468632#M23613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carmel&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. Yes this is what I have done i.e. I defined the colour manually, as you point out in your email. The issue is that I&amp;nbsp;need&amp;nbsp;to create 24 maps that look exactly the same, but have different content (different areas). I was hoping to set all this up with a script so I could just&amp;nbsp;use the same Arcade script in all 24 maps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One question I have (and this may sound a little stupid): in the blogs there is continuous reference to&amp;nbsp;JavaScript and embedding Arcade in JavaScript. So can you use&amp;nbsp;&lt;SPAN&gt;JavaScript with (if needed) embedded&amp;nbsp;Arcade in a custom expression, either for rendering a map in AGOL or customising pop-ups in AGOL? I thought the expression fields only take Arcade, but perhaps they also take&amp;nbsp;JavaScript with Arcade in it?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this is the case I suppose it might be possible to define the colors programmatically?&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hugo&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt; &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Oct 2018 01:16:19 GMT</pubDate>
    <dc:creator>HugoBouckaert1</dc:creator>
    <dc:date>2018-10-23T01:16:19Z</dc:date>
    <item>
      <title>Using Arcade to color code a polygon layer based on attribute values</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468630#M23611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a map I use a "Custom Expression" to change the rendering style of a polygon layer, and use Arcade to make a custom expression. In Arcade, I combine all possible combinations of two fields. One field is named PIP and the other BIOSECURITY. Both use the same domain, namely a simple YES/NO choice where the code for "NO" = 0 and the code for YES = 1. However both fields can also be empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logic is that I use decode to change the values of PIP differently from those of BIOSECURITY so they can never be the same. Once that is done, I add them up. Because the values are always different, each addition should be unique. I use a WHEN&amp;nbsp;statement in which I add up the unique combinations of the values in the two fields.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN&lt;/P&gt;&lt;P&gt;(Decode($feature.PIP, 0, 2, 1, 4, 5) + Decode($feature.BIOSECURITY, 0, 22, 1, 32, 55) == 60,'Unique Color Code',&lt;/P&gt;&lt;P&gt;Decode($feature.PIP, 0, 2, 1, 4, 5) + Decode($feature.BIOSECURITY, 0, 22, 1, 32, 55) == 59, 'Another Unique Color Code', &amp;nbsp;'Default Value ')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But where I write &lt;SPAN&gt;'Unique Color Code',&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;and '&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Another Unique Color Code&lt;/SPAN&gt;&lt;SPAN&gt;' I would actually like to instruct Arcade to render those layers with a particular color, e.g. green or red. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I found some examples, but I think is for when you embed Arcade in JavaScript &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Decode($feature.PIP, 0, 2, 1, 4, 5) + Decode($feature.BIOSECURITY, 0, 22, 1, 32, 55) == 60, 'background-color:ff984f'‌&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I also tried: &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Decode($feature.PIP, 0, 2, 1, 4, 5) + Decode($feature.BIOSECURITY, 0, 22, 1, 32, 55) == 60, '#ff984f'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there any way in Arcade to directly assign colors to a polygon layer, based on a WHEN statement, as in the code snippet above?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hugo&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2018 08:48:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468630#M23611</guid>
      <dc:creator>HugoBouckaert1</dc:creator>
      <dc:date>2018-10-22T08:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using Arcade to color code a polygon layer based on attribute values</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468631#M23612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hugo,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the sounds of it, you're using the ArcGIS Online map viewer to render your layer's symbology?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you've configured arcade expression,&amp;nbsp;you can define the colours through&amp;nbsp;'Select a drawing style' instead of the expression yourself:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="595" src="https://community.esri.com/legacyfs/online/424998_pastedImage_2.png" width="539" /&gt;--&amp;gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" height="189" src="https://community.esri.com/legacyfs/online/424999_pastedImage_3.png" width="354" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you've already tried this, did this not meet your needs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Carmel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2018 16:21:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468631#M23612</guid>
      <dc:creator>CarmelConnolly</dc:creator>
      <dc:date>2018-10-22T16:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using Arcade to color code a polygon layer based on attribute values</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468632#M23613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carmel&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. Yes this is what I have done i.e. I defined the colour manually, as you point out in your email. The issue is that I&amp;nbsp;need&amp;nbsp;to create 24 maps that look exactly the same, but have different content (different areas). I was hoping to set all this up with a script so I could just&amp;nbsp;use the same Arcade script in all 24 maps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One question I have (and this may sound a little stupid): in the blogs there is continuous reference to&amp;nbsp;JavaScript and embedding Arcade in JavaScript. So can you use&amp;nbsp;&lt;SPAN&gt;JavaScript with (if needed) embedded&amp;nbsp;Arcade in a custom expression, either for rendering a map in AGOL or customising pop-ups in AGOL? I thought the expression fields only take Arcade, but perhaps they also take&amp;nbsp;JavaScript with Arcade in it?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this is the case I suppose it might be possible to define the colors programmatically?&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hugo&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt; &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2018 01:16:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468632#M23613</guid>
      <dc:creator>HugoBouckaert1</dc:creator>
      <dc:date>2018-10-23T01:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using Arcade to color code a polygon layer based on attribute values</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468633#M23614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Arcade does not be allow you to define the fill colors of your polygons. The expression will only return in this case a text&amp;nbsp; that you can use to define the symbology for your polygons using standard smart mapping. You can define colors in pop-up windows or labels, using the expressions, but not for symbology.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arcade is based on JavaScript (it is an extract from JavaScript&amp;nbsp;with some additional functions). An expression defined for one layer will not be available for the other layer and even when you copy the expression from another layer, you will still have to modify the symbology for each item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can however&amp;nbsp;create the expression and symbology for a single layer and use&amp;nbsp;&lt;A class="link-titled" href="https://ago-assistant.esri.com/" title="https://ago-assistant.esri.com/" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS Online Assistant&lt;/A&gt;&amp;nbsp; to apply it to the rest of the layers editing the json of the web map (this is a bit tricky!). Example expression:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; bio &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'BIOSECURITY'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; pip &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'PIP'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; result &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
If &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;IsEmpty&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pip&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="token function"&gt;Console&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"PIP=?"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pip &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; result &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"PIP:NO"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; result &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"PIP:YES"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

If &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;IsEmpty&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;bio&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="token function"&gt;Console&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"BIO:?"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;bio &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; result &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"&amp;nbsp; BIO:NO"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; result &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"&amp;nbsp; BIO:YES"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

result &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Trim&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;result&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;result&lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; result &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"No Data"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; result&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will yield the following options, here shown in the legend with a color applied to each item:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/425182_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In AGO assistant you will have to copy the entire layerDefinition section of the layer and insert it in the definition of the other layers. Be aware of creating an invalid json and do this preferably on a copy of the web map.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" height="646" src="https://community.esri.com/legacyfs/online/425183_pastedImage_3.png" width="461" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:46:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468633#M23614</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-11T20:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using Arcade to color code a polygon layer based on attribute values</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468634#M23615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help, your code is much better (and elegant) than mine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am now formatting the colour schemes manually, seeing I have clear confirmation this cannot be done in Arcade.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have looked into using JSON for defining drawinginfo for webmaps before. So this is what I am doing now also for the new results from the categories resulting from the arcade code. &amp;nbsp; First I use&amp;nbsp;&amp;nbsp;the arcgis.gis API to search for the webmap in question, and get the mapitem. Then I do this: &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mapitem.get_data().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The resultant JSON output is then put in a JSON formatter, after which I use everything that belongs to drawingInfo into a python progam as a variable. After that I search for layers in the other webmap, and copy the new JSON variable over by doing this: &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;layer ['layerDefinition'] = mysavedJSON&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hugo&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 04:52:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468634#M23615</guid>
      <dc:creator>HugoBouckaert1</dc:creator>
      <dc:date>2018-10-24T04:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using Arcade to color code a polygon layer based on attribute values  </title>
      <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468635#M23616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds good! Glad you came up with a way to avoid doing all this manually.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 11:49:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468635#M23616</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2018-10-24T11:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using Arcade to color code a polygon layer based on attribute values</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468636#M23617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe you can help me in a different direction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have RGB values in three separate columns.&amp;nbsp; I could put them into a single column, not an issue.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I would like to designate the polygon fill based on the RGB value.&amp;nbsp; I am doing this in Pro.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2020 20:23:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468636#M23617</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2020-01-20T20:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using Arcade to color code a polygon layer based on attribute values</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468637#M23618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/people/rborchert"&gt;rborchert&lt;/A&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I understand that should be possible:&amp;nbsp;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/help/mapping/layer-properties/attribute-driven-color-in-symbology.htm" title="https://pro.arcgis.com/en/pro-app/help/mapping/layer-properties/attribute-driven-color-in-symbology.htm"&gt;Attribute-driven color in symbology—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2020 20:38:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468637#M23618</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-01-20T20:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using Arcade to color code a polygon layer based on attribute values</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468638#M23619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks I will dig into that&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2020 20:50:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-color-code-a-polygon-layer-based/m-p/468638#M23619</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2020-01-20T20:50:15Z</dc:date>
    </item>
  </channel>
</rss>

