Hi,
Has anyone created a generic method that logs changes by the user into a EventLog table that records only the changes with both the before and after values? Maybe something built on oldval() and curval that iterates the table values and building the EventLog entry string as it iterates. The string would be something like "SB-2145 - Stanley made changes to TableName on 01/01/2015 at 11:25 PM. The changes are:
TableName.Amount's before value was 125.00, now its 137.12
TableName.Size's before value was Large, now its Small
........
When finished iterating, stuff it into the EventLog's memo field named details. The EventLog table has other fields like timestamps, userID, type (such as change, new, delete) and others that also gets updated.
The TableName.fieldname component could be grabbed using afields()...
Just wondering if someone has built such a beast before I attempt it.
Thanks,
Stanley
Has anyone created a generic method that logs changes by the user into a EventLog table that records only the changes with both the before and after values? Maybe something built on oldval() and curval that iterates the table values and building the EventLog entry string as it iterates. The string would be something like "SB-2145 - Stanley made changes to TableName on 01/01/2015 at 11:25 PM. The changes are:
TableName.Amount's before value was 125.00, now its 137.12
TableName.Size's before value was Large, now its Small
........
When finished iterating, stuff it into the EventLog's memo field named details. The EventLog table has other fields like timestamps, userID, type (such as change, new, delete) and others that also gets updated.
The TableName.fieldname component could be grabbed using afields()...
Just wondering if someone has built such a beast before I attempt it.
Thanks,
Stanley