<?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 'When' statement and empty fields in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-when-statement-and-empty-fields/m-p/736670#M36340</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/247462"&gt;Jay Hodny&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure the field is null (empty)&amp;nbsp;or does the field perhaps contains an single space or something not easy to detect? IsEmpty will correctly detect null values and empty strings, but not cases where you have a single string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Feb 2020 14:57:23 GMT</pubDate>
    <dc:creator>XanderBakker</dc:creator>
    <dc:date>2020-02-19T14:57:23Z</dc:date>
    <item>
      <title>Arcade 'When' statement and empty fields</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-when-statement-and-empty-fields/m-p/736667#M36337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&amp;nbsp; I am working with the January 22, 2020 FEMA data release for my area.&amp;nbsp; I am using the Flood Inquiry web map and app solution.&amp;nbsp; I am new to Arcade.&amp;nbsp; I am trying to create an expression using the 'When' function&amp;nbsp;to provide some descriptive text in the web map and application pop-up.&amp;nbsp; All works well except when I have no value in a record in the ZONE_SUBTY field.&amp;nbsp; How do I have the text written in the pop-up for empty fields?&amp;nbsp; Below is the current Arcade expression.&amp;nbsp; The string in italics is the troublemaker.&amp;nbsp; Thanks in advance, Jay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var zonesubtype = $feature.ZONE_SUBTY;&lt;BR /&gt;When (zonesubtype == 'FLOODWAY','Floodway designation of AE',&lt;EM&gt;zonesubtype == '','AE - An area inundated by 1% annual chance flooding for which BFEs have been determined'&lt;/EM&gt;,zonesubtype == '0.2 PCT ANNUAL CHANCE FLOOD HAZARD','X - An area determined be 0.2% annual chance flood hazard',zonesubtype == 'AREA OF MINIMAL FLOOD HAZARD','X - An area of minimal flood hazard','')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2020 22:22:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-when-statement-and-empty-fields/m-p/736667#M36337</guid>
      <dc:creator>JayHodny</dc:creator>
      <dc:date>2020-02-18T22:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade 'When' statement and empty fields</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-when-statement-and-empty-fields/m-p/736668#M36338</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/jhodny@Newark.de.us_CityOfNewarkDE" target="_blank"&gt;jhodny@Newark.de.us_CityOfNewarkDE&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps this would work:&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; zonesubtype &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ZONE_SUBTY&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
When &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;zonesubtype&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Specify what to return here...'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
      zonesubtype &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'FLOODWAY'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Floodway designation of AE'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
      zonesubtype &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="string token"&gt;'AE - An area inundated by 1% annual chance flooding for which BFEs have been determined'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
      zonesubtype &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'0.2 PCT ANNUAL CHANCE FLOOD HAZARD'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'X - An area determined be 0.2% annual chance flood hazard'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
      zonesubtype &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'AREA OF MINIMAL FLOOD HAZARD'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'X - An area of minimal flood hazard'&lt;/SPAN&gt;&lt;SPAN class="punctuation 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="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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:23:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-when-statement-and-empty-fields/m-p/736668#M36338</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-12T07:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade 'When' statement and empty fields</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-when-statement-and-empty-fields/m-p/736669#M36339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xander,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was close, as I was trying to use the ‘IsEmpty” function before my initial GeoNet post.  Here is what I am using now, but still no luck.  The ‘AE’ text string is still not showing in the pop-up.  Thank you for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var zonesubtype = $feature.ZONE_SUBTY;&lt;/P&gt;&lt;P&gt;When (IsEmpty(zonesubtype), 'AE - An area inundated by 1% annual chance flooding for which BFEs have been determined',&lt;/P&gt;&lt;P&gt;      zonesubtype == 'FLOODWAY','Floodway designation of AE',&lt;/P&gt;&lt;P&gt;      zonesubtype == '0.2 PCT ANNUAL CHANCE FLOOD HAZARD','X - An area determined be 0.2% annual chance flood hazard',&lt;/P&gt;&lt;P&gt;      zonesubtype == 'AREA OF MINIMAL FLOOD HAZARD','X - An area of minimal flood hazard', '')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 02:16:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-when-statement-and-empty-fields/m-p/736669#M36339</guid>
      <dc:creator>JayHodny</dc:creator>
      <dc:date>2020-02-19T02:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade 'When' statement and empty fields</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-when-statement-and-empty-fields/m-p/736670#M36340</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/247462"&gt;Jay Hodny&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure the field is null (empty)&amp;nbsp;or does the field perhaps contains an single space or something not easy to detect? IsEmpty will correctly detect null values and empty strings, but not cases where you have a single string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 14:57:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-when-statement-and-empty-fields/m-p/736670#M36340</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-02-19T14:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade 'When' statement and empty fields</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-when-statement-and-empty-fields/m-p/736671#M36341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xander,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was beginning to suspect this may be a cause.  I tried replacing the empty field records with   (calculate field) but accidently messed up my feature class field.  I have no restored the feature class and will proceed with more caution!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 16:11:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-when-statement-and-empty-fields/m-p/736671#M36341</guid>
      <dc:creator>JayHodny</dc:creator>
      <dc:date>2020-02-19T16:11:04Z</dc:date>
    </item>
  </channel>
</rss>

