<?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 Arcade expression to filter out geometries in ArcGIS Online in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-filter-out-geometries-in/m-p/199601#M9902</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to produce a webmap in ArcGIS online from a hosted feature layer to show current event locations.&lt;/P&gt;&lt;P&gt;The point feature layer has 2 time-based fields - StartDate and EndDate representing each event.&lt;/P&gt;&lt;P&gt;I would like to&amp;nbsp; produce a dynamic map of 'todays events' which will only show those events which are currently on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I have tried creating a filter expression using the 'in the last' option, but this wont work as my data wont suit this approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried using an Arcade expression as follows&amp;nbsp;based on code &lt;A href="https://gis.stackexchange.com/questions/300926/arcade-expression-to-see-if-current-date-is-within-two-dates"&gt;i found here&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var started = $feature.Start_Date&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;var closed = $feature.End_Date&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;var present = Now()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;// if current date/time is greater than or equal to the start time&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;// AND current date/time is less than or equal to the close time &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;// return open, otherwise its closed&lt;/EM&gt;&lt;BR /&gt;&lt;STRONG&gt;If (present &amp;gt;= started &amp;amp;&amp;amp; present &amp;lt;= closed) {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; return "Open today"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;However when I go to view this in my webmap I find that everything not returned as "Open today" is classified "Other" and is still selectable on my webmap popup, even if its visibility is removed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way using Arcade expressions in ArcGIS online to remove or filter out these unwanted geometries?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help much appreciated,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Sep 2019 10:25:46 GMT</pubDate>
    <dc:creator>NBC</dc:creator>
    <dc:date>2019-09-02T10:25:46Z</dc:date>
    <item>
      <title>Arcade expression to filter out geometries in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-filter-out-geometries-in/m-p/199601#M9902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to produce a webmap in ArcGIS online from a hosted feature layer to show current event locations.&lt;/P&gt;&lt;P&gt;The point feature layer has 2 time-based fields - StartDate and EndDate representing each event.&lt;/P&gt;&lt;P&gt;I would like to&amp;nbsp; produce a dynamic map of 'todays events' which will only show those events which are currently on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I have tried creating a filter expression using the 'in the last' option, but this wont work as my data wont suit this approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried using an Arcade expression as follows&amp;nbsp;based on code &lt;A href="https://gis.stackexchange.com/questions/300926/arcade-expression-to-see-if-current-date-is-within-two-dates"&gt;i found here&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var started = $feature.Start_Date&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;var closed = $feature.End_Date&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;var present = Now()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;// if current date/time is greater than or equal to the start time&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;// AND current date/time is less than or equal to the close time &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;// return open, otherwise its closed&lt;/EM&gt;&lt;BR /&gt;&lt;STRONG&gt;If (present &amp;gt;= started &amp;amp;&amp;amp; present &amp;lt;= closed) {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; return "Open today"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;However when I go to view this in my webmap I find that everything not returned as "Open today" is classified "Other" and is still selectable on my webmap popup, even if its visibility is removed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way using Arcade expressions in ArcGIS online to remove or filter out these unwanted geometries?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help much appreciated,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2019 10:25:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-filter-out-geometries-in/m-p/199601#M9902</guid>
      <dc:creator>NBC</dc:creator>
      <dc:date>2019-09-02T10:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression to filter out geometries in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-filter-out-geometries-in/m-p/199602#M9903</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/warringah"&gt;warringah&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you go into the options of the symbology, you can switch off "Other":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/458419_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2019 13:17:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-filter-out-geometries-in/m-p/199602#M9903</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2019-09-02T13:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression to filter out geometries in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-filter-out-geometries-in/m-p/199603#M9904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Xander,&amp;nbsp;&lt;/P&gt;&lt;P&gt;However the problem I am seeing is that the "Other" objects I have switched off in the webmap are still selectable and produce a pop-up even though they are invisible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2019 22:44:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-filter-out-geometries-in/m-p/199603#M9904</guid>
      <dc:creator>NBC</dc:creator>
      <dc:date>2019-09-02T22:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression to filter out geometries in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-filter-out-geometries-in/m-p/199604#M9905</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/50025"&gt;Northern Beaches Council&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that case maybe a hosted feature layer view could work... Not sure though.&amp;nbsp;&lt;A class="link-titled" href="https://doc.arcgis.com/en/arcgis-online/manage-data/create-hosted-views.htm" title="https://doc.arcgis.com/en/arcgis-online/manage-data/create-hosted-views.htm"&gt;Create hosted feature layer views—ArcGIS Online Help | ArcGIS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2019 12:26:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-filter-out-geometries-in/m-p/199604#M9905</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2019-09-03T12:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression to filter out geometries in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-filter-out-geometries-in/m-p/199605#M9906</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/50025"&gt;Northern Beaches Council&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;That's a pretty unique name &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I think I maybe be able to help you. Firstly, have you looked at &lt;A href="https://community.esri.com/migrated-users/8586"&gt;Jake Skinner&lt;/A&gt;‌'s post. As the post mention's this solution will require you to&amp;nbsp;&lt;EM style="background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;uncheck&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;-&amp;nbsp;&amp;nbsp;"allow only standard SQL queries".&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;If that is not an option, you'll have to&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;use&amp;nbsp;&lt;/SPAN&gt;&lt;EM style="background-color: #ffffff; border: 0px;"&gt;"in the last"&lt;/EM&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;EM style="background-color: #ffffff; border: 0px;"&gt;"not in the last"&lt;/EM&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&lt;/SPAN&gt;dynamic date expressions on your webmap's filter or when defining a feature layer view.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;The following expression will show features edited in the last day.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image" height="298" src="/legacyfs/online/477429_Dynamic Date Filters.png" width="591" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are to go with the 2nd option - you'll need to be a little creative &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To show events after your Start_Date - write the following expression: &lt;STRONG&gt;Start_Date&lt;/STRONG&gt;&amp;nbsp;&lt;SPAN style="color: #008000;"&gt;&lt;EM&gt;"in the last"&lt;/EM&gt;&lt;/SPAN&gt; &lt;STRONG&gt;90 years &lt;/STRONG&gt;(or a very large time period).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To show events before your End_Date - write the following expression:&amp;nbsp;&lt;STRONG&gt;End&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;_Date&lt;/STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #008000;"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;&lt;EM&gt;not in the last"&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;90 years &lt;/STRONG&gt;(or a very large time period).&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope this is helpful,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Gee&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jan 2020 10:45:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-filter-out-geometries-in/m-p/199605#M9906</guid>
      <dc:creator>GeeFernando</dc:creator>
      <dc:date>2020-01-04T10:45:58Z</dc:date>
    </item>
  </channel>
</rss>

