<?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 Help calculating field with arcade using two other fields including date range in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/help-calculating-field-with-arcade-using-two-other/m-p/1145308#M51657</link>
    <description>&lt;P&gt;I am new to Arcade and using ArcGIS Pro to calculate a field using an arcade expression.&lt;/P&gt;&lt;P&gt;I would like to calculate a field called "Eligiblity" with the domain "Eligible", "Not eligible", and "NA" based on two other fields: Status and Date.&lt;/P&gt;&lt;P&gt;There is one value in the "Status" field that I want to be classified as "NA" and three other values that are "Eligible for recollection" IF the event occurred more than 3 years ago and "Not eligible for recollection" if the event was within the last three years.&lt;/P&gt;&lt;P&gt;Basically as follows in plain English:&lt;/P&gt;&lt;P&gt;- If Status is Scouting return NA&lt;BR /&gt;- If Status is anything other than scouting (including SWSP Collection, Recollection SWSP, SOS Collection) and Date is before 12/31/2018, return Eligible&lt;BR /&gt;- If Status is anything other than scouting and Date is after 12/31/2018, return Not eligible&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here is what I have tried:&lt;/P&gt;&lt;P&gt;if($feature.STATUS is "Scouting") {return "NA"}&lt;BR /&gt;else if($feature.DATE &amp;lt;=Date(12/31/2018)) {return "Eligible for recollection"}&lt;BR /&gt;else {return "Not eligible for recollection"}&lt;/P&gt;</description>
    <pubDate>Thu, 17 Feb 2022 19:15:52 GMT</pubDate>
    <dc:creator>AshleeWolf525</dc:creator>
    <dc:date>2022-02-17T19:15:52Z</dc:date>
    <item>
      <title>Help calculating field with arcade using two other fields including date range</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-calculating-field-with-arcade-using-two-other/m-p/1145308#M51657</link>
      <description>&lt;P&gt;I am new to Arcade and using ArcGIS Pro to calculate a field using an arcade expression.&lt;/P&gt;&lt;P&gt;I would like to calculate a field called "Eligiblity" with the domain "Eligible", "Not eligible", and "NA" based on two other fields: Status and Date.&lt;/P&gt;&lt;P&gt;There is one value in the "Status" field that I want to be classified as "NA" and three other values that are "Eligible for recollection" IF the event occurred more than 3 years ago and "Not eligible for recollection" if the event was within the last three years.&lt;/P&gt;&lt;P&gt;Basically as follows in plain English:&lt;/P&gt;&lt;P&gt;- If Status is Scouting return NA&lt;BR /&gt;- If Status is anything other than scouting (including SWSP Collection, Recollection SWSP, SOS Collection) and Date is before 12/31/2018, return Eligible&lt;BR /&gt;- If Status is anything other than scouting and Date is after 12/31/2018, return Not eligible&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here is what I have tried:&lt;/P&gt;&lt;P&gt;if($feature.STATUS is "Scouting") {return "NA"}&lt;BR /&gt;else if($feature.DATE &amp;lt;=Date(12/31/2018)) {return "Eligible for recollection"}&lt;BR /&gt;else {return "Not eligible for recollection"}&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 19:15:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-calculating-field-with-arcade-using-two-other/m-p/1145308#M51657</guid>
      <dc:creator>AshleeWolf525</dc:creator>
      <dc:date>2022-02-17T19:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help calculating field with arcade using two other fields including date range</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-calculating-field-with-arcade-using-two-other/m-p/1145350#M51665</link>
      <description>&lt;P&gt;Very close, few pointers:&lt;/P&gt;&lt;P&gt;== is the syntax to check for equal to condition, not IS&lt;/P&gt;&lt;P&gt;Check syntax for &lt;A href="https://developers.arcgis.com/arcade/function-reference/date_functions/#date" target="_self"&gt;date function&lt;/A&gt;, you need Date(2018, 12, 31)&lt;/P&gt;&lt;P&gt;Make sure the capitalization of attributes match (i.e. STATUS is not equal to Status)&lt;/P&gt;&lt;P&gt;Make sure your output matches your domains (&lt;SPAN&gt;Eligible for recollection vs Eligible)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 20:42:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-calculating-field-with-arcade-using-two-other/m-p/1145350#M51665</guid>
      <dc:creator>HuubZwart</dc:creator>
      <dc:date>2022-02-17T20:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help calculating field with arcade using two other fields including date range</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-calculating-field-with-arcade-using-two-other/m-p/1145371#M51669</link>
      <description>&lt;P&gt;Thank you! Those tips did the trick. The following is what I ended up with, if it's helpful to anybody in the future:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if($feature.Status=="Scouting") {return "NA"}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;else if($feature.Date &amp;lt;=Date(2018,12,31)) {return "Eligible for recollection"}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;else {return "Not eligible for recollection"}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 21:21:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-calculating-field-with-arcade-using-two-other/m-p/1145371#M51669</guid>
      <dc:creator>AshleeWolf525</dc:creator>
      <dc:date>2022-02-17T21:21:31Z</dc:date>
    </item>
  </channel>
</rss>

