I am new to Arcade and using ArcGIS Pro to calculate a field using an arcade expression.
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.
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.
Basically as follows in plain English:
- If Status is Scouting return NA
- If Status is anything other than scouting (including SWSP Collection, Recollection SWSP, SOS Collection) and Date is before 12/31/2018, return Eligible
- If Status is anything other than scouting and Date is after 12/31/2018, return Not eligible
Here is what I have tried:
if($feature.STATUS is "Scouting") {return "NA"}
else if($feature.DATE <=Date(12/31/2018)) {return "Eligible for recollection"}
else {return "Not eligible for recollection"}