Hi all,
I'm trying to use Arcade for this first time on a hosted feature layer in AGOL.
The data for this layer is collected by a field crew using Collector for ArcGIS. The last_edit_date field is automatically populated for each feature during data collection.
In AGOL i want to display any features where the last edit date has exceeded a year from the current date to show that an inspection is now due on that feature.
As I've said, I'm new to Arcade but tried this expression but it doesn't seem to work correctly:
var inspDate = $feature["last_edited_date"];
if (DateAdd(inspDate, 1, year) < Today()) {
return 'Inspection overdue';
}
else {
return 'OK';
}
Any pointers on where I am going wrong or even if it is possible to do what I am trying to do?
Thanks