Hi,
I'm new to arcade and I'm trying to setup an immediate calculation rule where if the user updates the status to "replaced", the script will make a copy of the selected line feature with the same attributes and also update a field of the $feature. I've got the update a field part working, but cannot seem to get the create new line feature with same attributes values going. I'm not sure if i'm using the Dictionary and Feature functions properly.
Some of the fields are read only as they may be used for editor tracking, etc.
Any help would be appreciated. Thanks in advance!
if ($feature.Status =='REPLACED'){
var attributes = Dictionary(Text($feature))["attributes"]
Feature(Geometry($feature), attributes)
return 2022
}
else {
return -9999
}