So for example - for each iterated row - $feature["STATUS"] would be the current value in a field called 'STATUS' which could be Blank, 'WAITING', 'STARTED' or 'FINISHED'.
$feature["STARTTIME"] would have a expression whereby if = 'STARTED' AND isEmpty = TRUE, return the current time.
if = 'STARTED' and isEmpty is FALSE, just return the original value. This can probably just be done in the ELSE block of the statement:
NB I can't write Javascript properly
var startTime = 'yesterday'
var status = 'Started'
if (IsEmpty(startTime) && status == 'Started'){
return Now()}
else{
return startTime
}
try the above out in that Arcade playground ArcGIS Arcade | ArcGIS for Developers, change the starttime value to '' and see how it changes.
You'd apply similar logic to the FINISHTIME