<?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 in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology/m-p/1163948#M45561</link>
    <description>&lt;P&gt;&lt;STRONG&gt;IsEmpty&lt;/STRONG&gt; will check for nulls and empties. I think throwing that into an IIF would be maybe the simplest yet.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Iif(IsEmpty($feature.Name), 'red', 'green')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I always forget about just using IIF sometimes!&lt;/P&gt;</description>
    <pubDate>Wed, 13 Apr 2022 14:56:00 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2022-04-13T14:56:00Z</dc:date>
    <item>
      <title>Arcade Symbology</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology/m-p/1163938#M45556</link>
      <description>&lt;P&gt;I have a text filed that I want to symbolize: if there is no value -a red dot; if there is a value -a green dot.&lt;/P&gt;&lt;P&gt;I started but I'm new to Arcade and I'm stuck:&lt;/P&gt;&lt;P&gt;&amp;nbsp;var dot=$feature.Name&lt;BR /&gt;if dot=null&lt;BR /&gt;return "red"&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 14:39:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology/m-p/1163938#M45556</guid>
      <dc:creator>MariyanaKostov1</dc:creator>
      <dc:date>2022-04-13T14:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Symbology</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology/m-p/1163943#M45558</link>
      <description>&lt;P&gt;You can use &lt;A href="https://developers.arcgis.com/arcade/function-reference/logical_functions/#iif" target="_self"&gt;IIF&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;iif ($feature.Name != '', 'green', 'red') //if the attribute is a blank string
iif ($feature.Name != null, 'green', 'red') //if the attribute is a null value&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 14:49:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology/m-p/1163943#M45558</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2022-04-13T14:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Symbology</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology/m-p/1163944#M45559</link>
      <description>&lt;P&gt;In Arcade (as in many other coding languages), a single "=" assigns a value. "dot = null" will assign the&amp;nbsp;&lt;STRONG&gt;dot&amp;nbsp;&lt;/STRONG&gt;variable the value null.&lt;/P&gt;&lt;P&gt;Two equals signs checks the value and returns a true or false. "dot == null" -&amp;gt; True/False.&lt;/P&gt;&lt;P&gt;Also, in Arcade,&amp;nbsp;&lt;STRONG&gt;if&amp;nbsp;&lt;/STRONG&gt;statements follow the format&lt;/P&gt;&lt;PRE&gt;if ( condition ) {&lt;BR /&gt;    do something&lt;BR /&gt;} else {&lt;BR /&gt;    do something&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;The "else" is optional, but in your case, it will help to return a specific value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Re-writing your expression to follow that, we would have something like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var dot = $feature.Name

if (dot == null){
    return "red"
} else {
    return "green"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 14:47:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology/m-p/1163944#M45559</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-04-13T14:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Symbology</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology/m-p/1163945#M45560</link>
      <description>&lt;P&gt;Thank you gentlemen! I'll give it a try.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 14:51:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology/m-p/1163945#M45560</guid>
      <dc:creator>MariyanaKostov1</dc:creator>
      <dc:date>2022-04-13T14:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Symbology</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology/m-p/1163948#M45561</link>
      <description>&lt;P&gt;&lt;STRONG&gt;IsEmpty&lt;/STRONG&gt; will check for nulls and empties. I think throwing that into an IIF would be maybe the simplest yet.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Iif(IsEmpty($feature.Name), 'red', 'green')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I always forget about just using IIF sometimes!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 14:56:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology/m-p/1163948#M45561</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-04-13T14:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Symbology</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology/m-p/1163953#M45562</link>
      <description>&lt;P&gt;This is what I got which is not what I expected:-)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MariyanaKostov1_0-1649861906243.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/38789iDCAD98F9C07D39CA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MariyanaKostov1_0-1649861906243.png" alt="MariyanaKostov1_0-1649861906243.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some of the dot should be green because there are values in the Name filed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 15:00:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology/m-p/1163953#M45562</guid>
      <dc:creator>MariyanaKostov1</dc:creator>
      <dc:date>2022-04-13T15:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Symbology</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology/m-p/1163959#M45563</link>
      <description>&lt;P&gt;Well, the values you get from your expression could be&amp;nbsp;&lt;EM&gt;anything&lt;/EM&gt;, it doesn't necessarily know that you've specified a color name and want the dot to be that color. You still need to go into your symbology classes and define them each.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_0-1649862397491.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/38790iF51CED4AD4D11DDF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_0-1649862397491.png" alt="jcarlson_0-1649862397491.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And, as you found, if you don't have a value present in the data, it won't show up as being available for defining in your symbology settings.&lt;/P&gt;&lt;P&gt;Since your expression is really just a binary output, you can just define the "Other" symbology to be the alternate type. Then, even if the "no value" option shows up sometime in the future, you won't have to go in and re-define the symbology settings.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_1-1649862587707.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/38791iAE98C8628AE16DC2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_1-1649862587707.png" alt="jcarlson_1-1649862587707.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_2-1649862599043.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/38792i6C0AC5D325921FC5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_2-1649862599043.png" alt="jcarlson_2-1649862599043.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 15:09:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology/m-p/1163959#M45563</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-04-13T15:09:56Z</dc:date>
    </item>
  </channel>
</rss>

