Set value based on action being taken


I have a form where I enter a TimeEntry record. When creating the
record, I want the ‘end’ date to be null. When editing the record, I
want the field to be available. I can think of different ways to do
this, but I’m curious to see how this would be (should be) done in