AnsweredAssumed Answered

AUDIT TRAIL tracked changes help

Question asked by ngarnier on Jan 8, 2014
Latest reply on Jan 14, 2014 by robbybutler

Title

AUDIT TRAIL tracked changes help

Post

     Hi,

     I have followed the instructions from www.excelisys.com

http://www.excelisys.com/filemaker-tips-tricks-demos-downloads.php - last one on the page

     Creating an Audit Log
     in FileMaker Pro 7
     by Andrew Persons
      
     But i am working in FM13.  The audit trail demo fields work only with the original code.  Once I try to modify the code to the fields I need tracked the audit log will not pick up the data changes.  Is there a newer set of instructions?  Is there some consideration I'm missing?
      
     Please help.  Thank you.
      
     - Nadia
      
      
     Here is the code for the fields that are supposed to go on every layout so the fields can be tracked:
      
     Where is says "replacefield#" that's a placeholder for a real field name.
      
                                                                                                                                                                                                                                                                                                                                   
                         

Auditlog1

                         

                               

                         

                              (textfield)

                    
                         

                              /*Let ( [

                         

                               

                         

IDPrev = Substitute ( MiddleValues ( Auditfields1 ; 1 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD2Prev = Substitute ( MiddleValues ( Auditfields1 ; 2 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD3Prev = Substitute ( MiddleValues ( Auditfields1 ; 3 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD4Prev = Substitute ( MiddleValues ( Auditfields1 ; 4 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD5Prev = Substitute ( MiddleValues ( Auditfields1 ; 5 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD6Prev = Substitute ( MiddleValues ( Auditfields1 ; 6 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD7Prev = Substitute ( MiddleValues ( Auditfields1 ; 7 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD8Prev = Substitute ( MiddleValues ( Auditfields1 ; 8 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD9Prev = Substitute ( MiddleValues ( Auditfields1 ; 9 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD10Prev = Substitute ( MiddleValues ( Auditfields1 ; 10 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD11Prev = Substitute ( MiddleValues ( Auditfields1 ; 11 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD12Prev = Substitute ( MiddleValues ( Auditfields1 ; 12 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD13Prev = Substitute ( MiddleValues ( Auditfields1 ; 13 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD14Prev = Substitute ( MiddleValues ( Auditfields1 ; 14 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD15Prev = Substitute ( MiddleValues ( Auditfields1 ; 15 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD16Prev = Substitute ( MiddleValues ( Auditfields1 ; 16 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD17Prev = Substitute ( MiddleValues ( Auditfields1 ; 17 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD18Prev = Substitute ( MiddleValues ( Auditfields1 ; 18 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD19Prev = Substitute ( MiddleValues ( Auditfields1 ; 19 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD20Prev = Substitute ( MiddleValues ( Auditfields1 ; 20 ; 1 ) ; "¶" ; "" ) ;

                         

REPLACEFIELD21Prev = Substitute ( MiddleValues ( Auditfields1 ; 21 ; 1 ) ; "¶" ; "" ) ;

                         

                               

                         

                               

                         

IDCur = Substitute (ID ; "¶" ; "•" ) ;

                         

REPLACEFIELD2Cur = Substitute (REPLACEFIELD2 ; "¶" ; "•" ) ;

                         

REPLACEFIELD3Cur = Substitute (REPLACEFIELD3 ; "¶" ; "•" ) ;

                         

REPLACEFIELD4Cur = Substitute (REPLACEFIELD4 ; "¶" ; "•" ) ;

                         

REPLACEFIELD5Cur = Substitute (REPLACEFIELD5 ; "¶" ; "•" ) ;

                         

REPLACEFIELD6Cur = Substitute (REPLACEFIELD6 ; "¶" ; "•" ) ;

                         

REPLACEFIELD7Cur = Substitute (REPLACEFIELD7 ; "¶" ; "•" ) ;

                         

REPLACEFIELD8Cur = Substitute (REPLACEFIELD8 ; "¶" ; "•" ) ;

                         

REPLACEFIELD9Cur = Substitute (REPLACEFIELD9 ; "¶" ; "•" ) ;

                         

REPLACEFIELD10Cur = Substitute (REPLACEFIELD10 ; "¶" ; "•" ) ;

                         

REPLACEFIELD11Cur = Substitute (REPLACEFIELD11 ; "¶" ; "•" ) ;

                         

REPLACEFIELD12Cur = Substitute (REPLACEFIELD12 ; "¶" ; "•" ) ;

                         

REPLACEFIELD13Cur = Substitute (REPLACEFIELD13 ; "¶" ; "•" ) ;

                         

REPLACEFIELD14Cur = Substitute (REPLACEFIELD14 ; "¶" ; "•" ) ;

                         

REPLACEFIELD15Cur = Substitute (REPLACEFIELD15 ; "¶" ; "•" ) ;

                         

REPLACEFIELD16Cur = Substitute (REPLACEFIELD16 ; "¶" ; "•" ) ;

                         

REPLACEFIELD17Cur = Substitute (REPLACEFIELD17 ; "¶" ; "•" ) ;

                         

REPLACEFIELD18Cur = Substitute (REPLACEFIELD18 ; "¶" ; "•" ) ;

                         

REPLACEFIELD19Cur = Substitute (REPLACEFIELD19 ; "¶" ; "•" ) ;

                         

REPLACEFIELD20Cur = Substitute (REPLACEFIELD20 ; "¶" ; "•" ) ;

                         

REPLACEFIELD21Cur = Substitute (REPLACEFIELD21 ; "¶" ; "•" ) ;

                         

                               

                         

                               

                         

                              Case (

                         

                               

                         

IDCur ≠ IDPrev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & IDPrev & "\" to \"" & IDCur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD2Cur ≠ REPLACEFIELD2Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD2Prev & "\" to \"" & REPLACEFIELD2Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD3Cur ≠ REPLACEFIELD3Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD3Prev & "\" to \"" & REPLACEFIELD3Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD4Cur ≠ REPLACEFIELD4Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD4Prev & "\" to \"" & REPLACEFIELD4Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD5Cur ≠ REPLACEFIELD5Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD5Prev & "\" to \"" & REPLACEFIELD5Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD6Cur ≠ REPLACEFIELD6Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD6Prev & "\" to \"" & REPLACEFIELD6Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD7Cur ≠ REPLACEFIELD7Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD7Prev & "\" to \"" & REPLACEFIELD7Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD8Cur ≠ REPLACEFIELD8Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD8Prev & "\" to \"" & REPLACEFIELD8Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD9Cur ≠ REPLACEFIELD9Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD9Prev & "\" to \"" & REPLACEFIELD9Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD10Cur ≠ REPLACEFIELD10Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD10Prev & "\" to \"" & REPLACEFIELD10Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD11Cur ≠ REPLACEFIELD11Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD11Prev & "\" to \"" & REPLACEFIELD11Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD12Cur ≠ REPLACEFIELD12Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD12Prev & "\" to \"" & REPLACEFIELD12Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD13Cur ≠ REPLACEFIELD13Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD13Prev & "\" to \"" & REPLACEFIELD13Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD14Cur ≠ REPLACEFIELD14Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD14Prev & "\" to \"" & REPLACEFIELD14Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD15Cur ≠ REPLACEFIELD15Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD15Prev & "\" to \"" & REPLACEFIELD15Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD16Cur ≠ REPLACEFIELD16Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD16Prev & "\" to \"" & REPLACEFIELD16Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD17Cur ≠ REPLACEFIELD17Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD17Prev & "\" to \"" & REPLACEFIELD17Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD18Cur ≠ REPLACEFIELD18Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD18Prev & "\" to \"" & REPLACEFIELD18Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD19Cur ≠ REPLACEFIELD19Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD19Prev & "\" to \"" & REPLACEFIELD19Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD20Cur ≠ REPLACEFIELD20Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD20Prev & "\" to \"" & REPLACEFIELD20Cur & "\"¶"  ;

                         

                               

                         

REPLACEFIELD21Cur ≠ REPLACEFIELD21Prev ; Get ( CurrentHostTimeStamp ) & ": " & Get ( AccountName ) & " changed " & Get ( ActiveFieldName ) & " from \"" & REPLACEFIELD21Prev & "\" to \"" & REPLACEFIELD21Cur & "\"¶"  ;

                         

                               

                         

                              )

                         

                               

                         

                               & Auditlog1*/

                    
                         

Auditfields1

                         

                              (calc field)

                    
                         

                              /*Substitute (ID & "|" & REPLACEFIELD2 & "|" & REPLACEFIELD3 & "|" & REPLACEFIELD4 & "|" & REPLACEFIELD5 & "|" & REPLACEFIELD6 & "|" & REPLACEFIELD7 & "|" & REPLACEFIELD8 & "|" & REPLACEFIELD9 & "|" & REPLACEFIELD10 & "|" & REPLACEFIELD11 & "|" & REPLACEFIELD12 & "|" & REPLACEFIELD13 & "|" & REPLACEFIELD14 & "|" & REPLACEFIELD15 & "|" & REPLACEFIELD16 & "|" & REPLACEFIELD17 & "|" & REPLACEFIELD18 & "|" & REPLACEFIELD19 & "|" & REPLACEFIELD20 & "|" & REPLACEFIELD21 ; [ "¶" ; "•" ] ; [ "|" ; "¶" ] ) & Left ( Auditlog1 ; 0 )*/

                    
                         

Auditlog2
                              (text field)

                    
                         

                              /*Audit (

                         

                               

                         

AuditfieldsID & "•" & REPLACEFIELD2 & "•" & REPLACEFIELD3 & "•" & REPLACEFIELD4 & "•" & REPLACEFIELD5 & "•" & REPLACEFIELD6 & "•" & REPLACEFIELD7 & "•" & REPLACEFIELD8 & "•" & REPLACEFIELD9 & "•" & REPLACEFIELD10 & "•" & REPLACEFIELD11 & "•" & REPLACEFIELD12 & "•" & REPLACEFIELD13 & "•" & REPLACEFIELD14 & "•" & REPLACEFIELD15 & "•" & REPLACEFIELD16 & "•" & REPLACEFIELD17 & "•" & REPLACEFIELD18 & "•" & REPLACEFIELD19 & "•" & REPLACEFIELD20 & "•" & REPLACEFIELD21 & "•"

                         

                               

                         

                                ; "•" ; Auditlog2 )

                         

                               

                         

                               ; Auditfields2 )

                         

                               

                         

                               & Auditlog2*/

                    
                         

Auditfields2

                         

                              (calc field)

                    
                         

                              /*Auditfields (ID & "•" & REPLACEFIELD2 & "•" & REPLACEFIELD3 & "•" & REPLACEFIELD4 & "•" & REPLACEFIELD5 & "•" & REPLACEFIELD6 & "•" & REPLACEFIELD7 & "•" & REPLACEFIELD8 & "•" & REPLACEFIELD9 & "•" & REPLACEFIELD10 & "•" & REPLACEFIELD11 & "•" & REPLACEFIELD12 & "•" & REPLACEFIELD13 & "•" & REPLACEFIELD14 & "•" & REPLACEFIELD15 & "•" & REPLACEFIELD16 & "•" & REPLACEFIELD17 & "•" & REPLACEFIELD18 & "•" & REPLACEFIELD19 & "•" & REPLACEFIELD20 & "•" & REPLACEFIELD21 & "•"

                         

                              ; "•" ; Auditlog2 )*/

                    
      
      
     fields on the page are and ID field, the 4 audit fields - auditlog 1 and 2, auditfields 1 and 2, 2 global fields.
      
     It's all very confusing and I don't know what to do.
      
     I tried CNS audit which is a 3rd party solution but they are not updated for 13 yet.

Outcomes