- I have this expression that calculates years and populates a field called 'Age'. It gets this information to calculate years from a field called EstbYear (as you can see in the expression below) that I populate with the year it was established. However, it puts the years in the 'Age' field only after the layer is checked and unchecked in the web map. With this happening, another field calculation that relies on 'Age' is not getting calculated unless I go back in and put the age manually first, before I put in the other variables for the calculation to happen
This is the calculation I used which is working just fine:
var currentTime = Year(Now());
var survey = $feature["EstbYear"];
// Calculate age in years
var age = 0;
if (!IsEmpty(survey)) {
age = currentTime - survey;
}
return age;
Is there something I am missing. Do I have to tell somewhere that the next calculation needs to double check the 'Age' field so it can calculate the next field. Do I need to put something in the arcade rule in ArcGIS Pro for the calculation to recognize 'Age' field to so it can see the 'Age' field value to do the next calculation?
Thank you for your help,
Abi