1 Reply Latest reply on Apr 5, 2012 2:33 PM by Stephen Huston

    Using TimeStamp for each field?

    inov8pro

      FM Pro 12 Advanced

       

      I know how to create a Timestamp, creation and modification, for each table but how would I go about a Timestamp for each field in the table? I guess this could have some effects on both size and performance of my FM database.

       

      Thanks for any help.

       

      Paul

        • 1. Re: Using TimeStamp for each field?
          Stephen Huston

          Hi Paul,

           

          It sounds like what you want is a ChangeLog field where you capture info about edits in each (or selected) fields.

           

          You don't need a field for each timestamp, just one field to collect them as edited which records info about the edit and field, maybe who did it, and what they changed.

           

          There are a lot of methods for logging specific data. My favorite, is to create a text field (lets call it editLog) which has auto-entry by calculation as the option. The calc for its auto-entry (I am typing "PR" in place of the paragraph return symbol in the calc engine) would be something like

           

          Evaluate (

          Quote (

          editLog & "PR" & Get (currentTimeStamp) & ", " & Get(AccountName) & " edited " & Get (ActiveFieldName)

          & ": " & Get (ActiveFieldContent)

          ) ; [ fieldtotrack1 ; fieldtotrack2, etc... ] )

           

          Be sure you set it to evaluate even if the field is empty. It will record what happens to all the fields you list in the brackets with the most recent edits at the top of the editLog field.

           

          Caveat: I wrote this here from memory, so actual function names may vary a little, but you can recognize them.  [ I hope I got the ( and ) symbols correct.]

           

          There are other ways as well, including setting script triggers on your fields to track and collecting info as you exit each field.