You can use script triggers on each field to perform a script that logs the current timestamp in the corresponding record in the table of timestamp fields. Use a primary key in the current table to match to a foreign key in the timestamp table. Enable "allow creation of records via this relationship" so that the first time such a trigger is tripped, it automatically creates the matching record in the TimeStamp table.
YourTable::__pkYourTableID = ModLog::_fkYourTableID
The script can be:
Set Field By Name [ Get ( ScriptParameter ) ; Get ( CurrentTimeStamp ) ]
This allows you to use one script for each field, use this expression as the script parameter:
GetFieldName ( YourTable::FieldName ) // but use an actual table and field name from your solution.
GetFieldName ensures that this continues to work even if you rename a field, table or table occurrence.
Hmmm, Typed too fast there, we need to modify that slightly:
Set Field By Name [ "ModLog::" & Get ( ScriptParameter ) ; Get ( CurrentTimeStamp ) ]
and the parameter expression should be:
Let ( T = GetFieldName ( YourTable::FieldName ) ; Left ( T ; Position ( T ; ":" ; 1 ; 1 ) - 1 ) )
This assumes exactly matching field names in ModLog and your table.
Thanks a lot! I will try it, it was a huge help!