Hi,
I am trying to delete a feature based on the length of time that passes. I am hoping to fully automate a project that we are working on so that if a certain number of days pass, then that particular feature gets deleted. I hope someone can assist. I am relatively new to attribute rules but the few that I have implemented, it has helped significantly with automating tasks.
var From = Date($feature.OutageEnd)
var To = Date(Now())
var DaysAfterOutage = DateDiff(To, From, 'days')
//Constants for defining which features to delete//
var UniqueID = $feature.GlobalID
//Define which features to delete after a given amount of time//
if (DaysAfterOutage >= 7){
return {
'edit':[
'deletes':[
{UniqueID}
]
]
}
}Any help on this would be greatly appreciated.