<?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: Arcade symbology expression for custom groups in Esri Forestry Group (EFG) Questions</title>
    <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/arcade-symbology-expression-for-custom-groups/m-p/866090#M57</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chelsea!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your help with this!&amp;nbsp; I managed to successfully insert your script into AGOL and get the symbology to set to the 3 categories.&amp;nbsp; Its perfect!&lt;/P&gt;&lt;P&gt;Greatly apprecaite your help on this one!!&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Nov 2019 13:25:15 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2019-11-06T13:25:15Z</dc:date>
    <item>
      <title>Arcade symbology expression for custom groups</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/arcade-symbology-expression-for-custom-groups/m-p/866087#M54</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Looking to see if someone would be able to assist in generating an Arcade expression that I would like to apply to an internal REST service.&lt;/P&gt;&lt;P&gt;It is a tree inventory layer (800,000+ features) that I would like to create 3 custom groups (High, Medium and Low Risk) based on the&amp;nbsp;tree species name.&lt;/P&gt;&lt;P&gt;Based on these three groups, I want to change the point symbology to either a red colour for high-risk, orange point for medium-risk and yellow colour for low-risk trees.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attempted to do create it but with no luck.&amp;nbsp; The script below seems to generate only the Low-Risk group when added to arcgis pro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script as of now:&lt;/P&gt;&lt;P&gt;var name = $feature.BOTANICAL_NAME&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if (name == "Quercus*"|| name == "Acer*"|| name == "Picea*") {&lt;BR /&gt; &lt;BR /&gt; return "High Risk" }&lt;BR /&gt;}&lt;BR /&gt;if (name == "Betula*" || name =="Fagus*"|| name =="Salix*" || name =="Juglans*" || name =="Gleditsia*" || name =="Malus*" || name =="Prunus*" ) { &lt;BR /&gt; return "Medium Risk"}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;else {&lt;/P&gt;&lt;P&gt;return "Low Risk" }&lt;BR /&gt; &lt;BR /&gt;I never claimed to be good at scripting by the way! &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Any assistance would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Josh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2019 12:40:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/arcade-symbology-expression-for-custom-groups/m-p/866087#M54</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-10-30T12:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade symbology expression for custom groups</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/arcade-symbology-expression-for-custom-groups/m-p/866088#M55</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/381511"&gt;Josh McMeekin&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I assume your botanical names are like this: "&lt;SPAN style="color: #222222; background-color: #ffffff; font-size: 14px;"&gt;Quercus robur" right? I used split to split the botanical name into a list of characters (words in this case) found between spaces, and then grabbed the first word because indexes start at 0 (the [0]) and then Decode to find the string that you want associated with that word. The last line, 'Low Risk', is the default in case none of the others are found to be a match.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var firstword = Split($feature.name, " ")[0]&lt;BR /&gt;return Decode(firstword,&lt;BR /&gt; 'Quercus','High Risk',&lt;BR /&gt; 'Acer','High Risk',&lt;BR /&gt; 'Picea','High Risk',&lt;BR /&gt; 'Betula','Medium Risk',&lt;BR /&gt; 'Fagus','Medium Risk',&lt;BR /&gt; 'Salix','Medium Risk',&lt;BR /&gt; 'Juglans','Medium Risk',&lt;BR /&gt; 'Gleditsia','Medium Risk',&lt;BR /&gt; 'Malus','Medium Risk',&lt;BR /&gt; 'Prunus', 'Medium Risk',&lt;BR /&gt;'Low Risk')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More information:&lt;/P&gt;&lt;P&gt;Decode:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/arcade/function-reference/logical_functions/#decode" title="https://developers.arcgis.com/arcade/function-reference/logical_functions/#decode"&gt;Logical Functions | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Split:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/arcade/function-reference/text_functions/#split" title="https://developers.arcgis.com/arcade/function-reference/text_functions/#split"&gt;Text Functions | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know how that works for you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2019 18:16:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/arcade-symbology-expression-for-custom-groups/m-p/866088#M55</guid>
      <dc:creator>ChelseaRozek</dc:creator>
      <dc:date>2019-10-30T18:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade symbology expression for custom groups</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/arcade-symbology-expression-for-custom-groups/m-p/866089#M56</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Josh:&lt;/P&gt;&lt;P&gt;FYI... Here's an alternative solution with Python3 using regular expressions.&amp;nbsp; Though the answer given by Chelsea Rozek is the best way to implement this using Arcade. The only real difference between the two is that if any of the names were not spaced properly then the Arcade solution would not catch it, since the Split function is looking for a space in the field value.&amp;nbsp; For example if "Juglans nigra" was missing the space, such as "Juglansnigra".&amp;nbsp; The solution using Python regular expressions would still correctly categorize this.&amp;nbsp; But, assuming your data is clean and properly spaced, this is a non-issue.&amp;nbsp; Additionally, you could alter the Regular Expression to catch all cases (upper and lower) of Juglans in the field values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOLUTION:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/472469_species_risk.JPG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUTPUT:&lt;BR /&gt;&lt;IMG alt="" class="jive-emoji jive-image image-2 j-img-original" src="https://community.esri.com/legacyfs/online/472471_species_risk_output.JPG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2019 15:48:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/arcade-symbology-expression-for-custom-groups/m-p/866089#M56</guid>
      <dc:creator>JonLunsford1</dc:creator>
      <dc:date>2019-11-05T15:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade symbology expression for custom groups</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/arcade-symbology-expression-for-custom-groups/m-p/866090#M57</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chelsea!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your help with this!&amp;nbsp; I managed to successfully insert your script into AGOL and get the symbology to set to the 3 categories.&amp;nbsp; Its perfect!&lt;/P&gt;&lt;P&gt;Greatly apprecaite your help on this one!!&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2019 13:25:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/arcade-symbology-expression-for-custom-groups/m-p/866090#M57</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-11-06T13:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade symbology expression for custom groups</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/arcade-symbology-expression-for-custom-groups/m-p/866091#M58</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Jon for your suggestion. I appreciate you sending the pic of your python script as I will be sure to reference this down the road.&lt;/P&gt;&lt;P&gt;I needed the script in Arcade though as I was doing some custom symbology on a web service that I wanted to use in Arc Enterprise.&lt;/P&gt;&lt;P&gt;Thank you again though for your suggestions!&lt;/P&gt;&lt;P&gt;Take care!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2019 13:27:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/arcade-symbology-expression-for-custom-groups/m-p/866091#M58</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-11-06T13:27:31Z</dc:date>
    </item>
  </channel>
</rss>

