I have a layer set up in field maps called 'Nest searches'. Users collect a polyline showing where they searched for bird nests by streaming their location in the field.
I want Field Maps to automatically calculate the date-time start for the polyline, and the date-time end.
Ideally, when the user clicks "collect", the current date-time will fill the field 'date_time_start'. When the user toggles 'yes' on the field 'track_complete', the current date-time will fill the field 'date_time_end'.
This is happening properly within field maps on my iPhone, but as soon as I press submit, both those values are recalculated.
Without collecting m-values for these lines, is there another way to force Field Maps NOT to recalculate upon submit? AI is not helping me out here, it's out of ideas.
Here's the two expressions I'm currently using that aren't working:
// Only set the start time if it hasn't been set already
if (IsEmpty($feature.Date_time_start)) {
return Now();
} else {
return $feature.Date_time_start;
}
// Only return the current time if "Track_complete" is 'yes'
if ($feature.Track_complete == "yes" && IsEmpty($feature.Date_time_end)) {
return Now();
} else {
return $feature.Date_time_end;
}