After accidentally deleting a field, we can restore it via undelete or snapshot.
HOWEVER, the deleted field was referenced by a ‘last modified date’ field. When the deleted field is restored from Trash, the last modified date is set to the current date/time for all records. I understand this is expected behavior. but I’m looking for a workaround.
Using the snapshot, we can recover the original ‘last modified date’, but there are two remaining problems:
Is there a way to keep the time stamps for the restored records on import?
And is there a way to fix the time stamp for those recently updated records?
there are many workarounds, but it depends on table config, how often data changes, the ways you could insert restored column to the original base (if no records were added/deleted, and you have stable unique value at least in 1 field, you can just choose the same sorting and copy-caste whole field).
you may also think about:
maybe you should test it all before on other base to plan your steps and better understand how it works
Thanks for your advice, Alexey.
I almost followed all of it :winking_face:
I didn’t mention that the “last modified date” field is not set to change for all fields, but only one status field (which was the field that was accidentally deleted).
I understand I can create a copy of the snapshot date field and have a frozen set of dates.
The problem is that each record could have new modifications going forward which should be captured in a “las modified date” field. So, as long as the record is not touched, I would use the ‘frozen’ field, but I want to capture future changes afterwards automatically.
My first idea was to create the ‘frozen’ date field from the snapshot and then, in place of the last modified field, use instead a calculation like "if [‘frozen’ date] = blank(), last modified time[status field], [‘frozen’ date]). But that would not update the last modified date for any record that changed afterwards.
BUT, this discussion is helping me. I’m now thinking I can create two new fields in addition to the restored, static date field:
The Last Modified Date field has the same date/time for all records because it change all at once when the field it was based on was deleted/undeleted.
Field 0: Status field (that Last Modified Date field points to)
Field 1: Restored, static dates
Field 2: Last Modified Date of Field 0
Field 3: if Field 2 = (Date/Time of field deletion), then Field 1, else Field 2
Hide all but Field 3
Haven’t tested this - just wanted to note the idea here.