Hi,
I am trying to create some attribute rules to work with our Cartegraph instance so we can keep track of data that has been retired by our Public Works crews. I have created two simple expressions to calculate a date field and to alter a lifecycle field, but they will not allow me to manually populate the date field and retire a feature.
Here are the two expressions, the first calculates the date for a feature thats lifecycle is not asbuilt or unknown. The second is supposed to calculate the lifecycle as abandoned if there is a date in the CarteRetire field. I assume the majority of the problem lies in the second expression; I am not very good at scripting yet. Both of these are set to trigger on updates only.
if ($feature.LIFECYCLE == "ASBUILT,UNKNOWN" || $feature.LIFECYCLE == $originalfeature.LIFECYCLE){
return NULL
} else {
return Date()
}
if (IsEmpty($feature.CarteRetire))
return $feature.LIFECYCLE
else {
return "ABANDONED"
}