<?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: ArcGIS Online - Web map symbol categories using Arcade expression problem in ArcGIS Online Developers Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-developers-questions/arcgis-online-web-map-symbol-categories-using/m-p/369228#M436</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/migrated-users/33624"&gt;Maxime Demers&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's exclude something first. Your field "matelas_quantite" is numerical, right? Can you also try to change $feature.&lt;SPAN&gt;matelas_quantite to $feature["matelas_quantite"]? There can be some issues when a field contains an underscore in the name.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What would work best for me if I had access to the data to&amp;nbsp;detect where things might be going wrong. Is it possible to share the web map and data with me using my AGOL account "xbakker.spx"?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2020 15:36:39 GMT</pubDate>
    <dc:creator>XanderBakker</dc:creator>
    <dc:date>2020-05-26T15:36:39Z</dc:date>
    <item>
      <title>ArcGIS Online - Web map symbol categories using Arcade expression problem</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/arcgis-online-web-map-symbol-categories-using/m-p/369227#M435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a problem using an Arcade expression to create categories in order to style the features symbols in a web map on ArcGIS Online&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to style a feature symbol if a field value is greater than of 0. If the field value is 0, I want to use another field values as categories.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using this Arcade expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;get_symbol_cat&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;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;matelas_quantite &lt;SPAN class="operator token"&gt;&amp;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;
   &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"matelas"&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;
   &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Text&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;collectefaite&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="token function"&gt;get_symbol_cat&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I go to the symbol styling menu, there is only the category "matelas" and "other" available. The categories of $feature.collectefaite are not available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="493429" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/493429_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is really weird, because if I slightly modify the Arcade expression using greather than 1 instead of 0. It's working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="" style="color: #0077aa;"&gt;function&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d74444;"&gt;get_symbol_cat&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;)&lt;/SPAN&gt; &lt;SPAN class="" style="color: #999999;"&gt;{&lt;/SPAN&gt;
 &lt;SPAN class="" style="color: #0077aa;"&gt;if&lt;/SPAN&gt; &lt;SPAN class="" style="color: #999999;"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="" style="color: #999999;"&gt;.&lt;/SPAN&gt;matelas_quantite &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5);"&gt;&amp;gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #990000;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;{&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0077aa;"&gt;   return&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #669900;"&gt;"matelas"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;
 &lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #0077aa;"&gt;else&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;{&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;
   &lt;/SPAN&gt;&lt;SPAN class="" style="color: #0077aa;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #d74444;"&gt;Text&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;$feature&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;collectefaite&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;
 &lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d74444;"&gt;get_symbol_cat&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="border-right: 1px solid #999999; padding-top: 1em;"&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;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="493433" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/493433_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea what could be wrong?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;P.S.: There is 385 features in the layer, 135 where $feature.matelas_quantite is greater than 0 and 250 where $feature.matelas_quantite is equal to 0.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:07:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/arcgis-online-web-map-symbol-categories-using/m-p/369227#M435</guid>
      <dc:creator>MaximeDemers</dc:creator>
      <dc:date>2021-12-11T17:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online - Web map symbol categories using Arcade expression problem</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/arcgis-online-web-map-symbol-categories-using/m-p/369228#M436</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/migrated-users/33624"&gt;Maxime Demers&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's exclude something first. Your field "matelas_quantite" is numerical, right? Can you also try to change $feature.&lt;SPAN&gt;matelas_quantite to $feature["matelas_quantite"]? There can be some issues when a field contains an underscore in the name.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What would work best for me if I had access to the data to&amp;nbsp;detect where things might be going wrong. Is it possible to share the web map and data with me using my AGOL account "xbakker.spx"?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2020 15:36:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/arcgis-online-web-map-symbol-categories-using/m-p/369228#M436</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-05-26T15:36:39Z</dc:date>
    </item>
  </channel>
</rss>

