<?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 else statement with intersect features in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-else-statement-with-intersect-features/m-p/1290556#M52288</link>
    <description>&lt;P&gt;You're checking the layer for null, which it never will be.&lt;/P&gt;&lt;P&gt;What you want to do:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;get the first element of the intersect&lt;UL&gt;&lt;LI&gt;if there is no intersection, the intersect fs will be empty. calling First() on an empty fs will return null&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;check that element for null&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var evac_fs = FeatureSetByName($map,"RDNO Evacuation Areas")
var evac = First(Intersects(evac_fs, $feature))
return IIf(evac == null, "None", evac.Type)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2023 07:52:04 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2023-05-18T07:52:04Z</dc:date>
    <item>
      <title>Arcade else statement with intersect features</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-else-statement-with-intersect-features/m-p/1290361#M52271</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using the arcade expressions for a popup feature for emergency statuses. When you click on the land parcel of interest, if the parcel intersects with the evacuation polygon it will say the Type field: 'Evacuation Alert'. But if you are not in an evacuation alert area; I would like it to say 'None'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is currently how I have the code which is how it is displaying on the below images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gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Type&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SWrdno_0-1684353657487.png" style="width: 339px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/71012i5291BC98EA72E494/image-dimensions/339x378?v=v2" width="339" height="378" role="button" title="SWrdno_0-1684353657487.png" alt="SWrdno_0-1684353657487.png" /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SWrdno_1-1684353684082.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/71013i8CC370998DF31EB5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SWrdno_1-1684353684082.png" alt="SWrdno_1-1684353684082.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have reviewed the other posts from these two below, I don't know what's going wrong here.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-online-questions/arcade-intersect-returns-null-field-values/td-p/1174652" target="_blank"&gt;https://community.esri.com/t5/arcgis-online-questions/arcade-intersect-returns-null-field-values/td-p/1174652&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/arcade-if-else-do-nothing/td-p/207436" target="_blank"&gt;https://community.esri.com/t5/arcgis-pro-questions/arcade-if-else-do-nothing/td-p/207436&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 20:20:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-else-statement-with-intersect-features/m-p/1290361#M52271</guid>
      <dc:creator>SWrdno</dc:creator>
      <dc:date>2023-05-17T20:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade else statement with intersect features</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-else-statement-with-intersect-features/m-p/1290556#M52288</link>
      <description>&lt;P&gt;You're checking the layer for null, which it never will be.&lt;/P&gt;&lt;P&gt;What you want to do:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;get the first element of the intersect&lt;UL&gt;&lt;LI&gt;if there is no intersection, the intersect fs will be empty. calling First() on an empty fs will return null&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;check that element for null&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var evac_fs = FeatureSetByName($map,"RDNO Evacuation Areas")
var evac = First(Intersects(evac_fs, $feature))
return IIf(evac == null, "None", evac.Type)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 07:52:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-else-statement-with-intersect-features/m-p/1290556#M52288</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-05-18T07:52:04Z</dc:date>
    </item>
  </channel>
</rss>

