Hey everyone!
I'm very new to Arcade, so bear with me.
In my AGO map, I have a "Parks" point layer and it's related "Assessments" table. I am trying to calculate a field in the "Parks" layer to display the days since the last assessment, based on the date field in the "Assessments" table.
I understand that I need to use the DateDiff function, but it seems to be having a problem finding the related table and date field I'm wanting to point to.
The relationship is a 1:M, and I'd like to pull the most recent assessment date. I'm not sure if it's the syntax or the 1:M that is causing an error:
var startDate = Date();
var endDate = Date(InspectionDate);
var age = DateDiff(endDate, startDate, 'days');
return age;
Execution Error:Runtime Error: Identifier Not Found. InspectionDate
Any help would be much appreciated! Thanks!