PROCEDURE LogUpdate LPARAMETERS tcTable LOCAL lnFields, laFields[ 1 ], lnI, lcFieldName IF NOT USED( 'LogFile' ) USE logFile IN 0 ENDIF lnFields = AFIELDS( laFields, tcTable ) FOR lnI = 1 TO lnFields lcFieldName = ALLTRIM( laFields[ lnI, 1 ] ) IF GETFLDSTATE( lcFieldName, tcTable ) = 2 INSERT INTO LogFile ( TableName, FieldName, OldValue, NewValue ) VALUES ( tcTable, lcFieldName, TRANSFORM( OLDVAL( lcFieldName, tcTable ) ), TRANSFORM( EVALUATE( tcTable + [.] + lcFieldName ) ) ) ENDIF ENDFORThen, on the table that you want to log, you specify this as its update trigger under the table tab of the table designer:
logupdate("MyTable")