<?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 expression for 6 years after effective date in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-6-years-after-effective-date/m-p/1188289#M46747</link>
    <description>&lt;P&gt;Thank you so much, I really appreciate the help!&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jun 2022 14:12:06 GMT</pubDate>
    <dc:creator>L77</dc:creator>
    <dc:date>2022-06-30T14:12:06Z</dc:date>
    <item>
      <title>Arcade expression for 6 years after effective date</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-6-years-after-effective-date/m-p/1188103#M46727</link>
      <description>&lt;P&gt;I need help writing an expression to use in ArcGIS online in a hosted feature service for symbolizing forest practice application data.&lt;/P&gt;&lt;P&gt;This is what I need it to display:&lt;/P&gt;&lt;P&gt;&amp;nbsp;If (The effective date plus 6 years)= date before today,&amp;nbsp; Label &amp;amp; Symbol: "6 year moratorium has ended"&lt;/P&gt;&lt;P&gt;&amp;nbsp;If (The effective date plus 6 years)= date after today,&amp;nbsp; Label &amp;amp; Symbol: "Active Permit"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the dataset I am using:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.arcgis.com/home/webmap/viewer.html?url=https%3A%2F%2Fgis.dnr.wa.gov%2Fsite2%2Frest%2Fservices%2FPublic_Forest_Practices%2FWADNR_PUBLIC_FP_FPA%2FMapServer&amp;amp;source=sd" target="_blank"&gt;https://www.arcgis.com/home/webmap/viewer.html?url=https%3A%2F%2Fgis.dnr.wa.gov%2Fsite2%2Frest%2Fservices%2FPublic_Forest_Practices%2FWADNR_PUBLIC_FP_FPA%2FMapServer&amp;amp;source=sd&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I started out writing this, but it isn't correct.&lt;/P&gt;&lt;P&gt;var startDate = $feature["EFFECTIVE_DT"];&lt;BR /&gt;var sixyears = DateAdd(startDate,6, 'years')&lt;BR /&gt;return sixyears;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 22:45:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-6-years-after-effective-date/m-p/1188103#M46727</guid>
      <dc:creator>L77</dc:creator>
      <dc:date>2022-06-29T22:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression for 6 years after effective date</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-6-years-after-effective-date/m-p/1188112#M46729</link>
      <description>&lt;P&gt;Maybe try something like this before your DateAdd line? Maybe it's not treating the date as you expect it to be..&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var recordDate = Date($feature.dateField)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 22:59:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-6-years-after-effective-date/m-p/1188112#M46729</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2022-06-29T22:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression for 6 years after effective date</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-6-years-after-effective-date/m-p/1188203#M46738</link>
      <description>&lt;P&gt;You're almost there. The last step is to determine whether the date you calculated is before or after today:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var startDate = $feature["EFFECTIVE_DT"];
var sixyears = DateAdd(startDate,6, 'years')
return sixyears &amp;lt; Today()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will return true for permits that passed the moratorium date, false for active permits.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_0-1656578743535.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/44864i81B370FA4572DDC1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_0-1656578743535.png" alt="JohannesLindner_0-1656578743535.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;Then you can change the legend labels:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_1-1656578785670.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/44865i0A89BB7FE8B96B99/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_1-1656578785670.png" alt="JohannesLindner_1-1656578785670.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And that's it.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_2-1656578852149.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/44866iCCF8AF54022069DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_2-1656578852149.png" alt="JohannesLindner_2-1656578852149.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2022 08:49:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-6-years-after-effective-date/m-p/1188203#M46738</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-06-30T08:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression for 6 years after effective date</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-6-years-after-effective-date/m-p/1188289#M46747</link>
      <description>&lt;P&gt;Thank you so much, I really appreciate the help!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2022 14:12:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-6-years-after-effective-date/m-p/1188289#M46747</guid>
      <dc:creator>L77</dc:creator>
      <dc:date>2022-06-30T14:12:06Z</dc:date>
    </item>
  </channel>
</rss>

