I have a Survey Date attribute in feature layer that I have set to populate with calculated expression in the smart form. When you open the form to edit the point (not create a new point), the date field is updated to the current date since the calculated expression is now(). Is there a way to not trigger the calculated expression if the field is already populated?
When I try to only update if the survey date field is null, I receive an Invalid DateTime error in the form.
//Arcade snip for calculating new date if the survey date field is empty
if (IsEmpty($feature.SurveyDate)) {
return now()
} else {
return $feature.SurveyDate
}
result

EDIT: This layer is from a feature service published from a SDE database. The survey date field is a Date type field.