Hi all,
I'm curious if it's possible to customize the following function by incorporating specific fields, such as (First_name, Lastname, Nationality, etc).
/* Added exclusions parameter to avoid script */
Let ( [
~thisField = GetValue ( fieldList ; 1 ) ;
~thisFieldType = FieldType ( Get ( FileName ) ; ~thisField ) ;
~changelog = changelog & ¶ ;
// Parse previous value for this field from the existing Change Log text
// This next step uses special "arrowhead" characters, not less than and greater than, to reduce the likelihood of finding a match within field contents
~prevValueStart = Position ( ~changelog ; "˂" & ~thisField & "˃" ; 1 ; 1 ) ;
~prevValueStart = Case ( ~prevValueStart > 0 ; Position ( ~changelog ; "\" to \"" ; ~prevValueStart ; 1 ) + 6 ) ;
~prevValue = Case ( ~prevValueStart > 0 ; Middle ( ~changelog ; ~prevValueStart ; Position ( ~changelog ; ¶ ; ~prevValueStart ; 1 ) - ~prevValueStart - 1 ) )
] ;
Case ( not IsEmpty ( ~thisField ) ;
List ( // Record a change for this field value if it's not a calculation field, and it's not in our ignored list
Case ( IsEmpty ( FilterValues ( ~thisField ; exclusions ) ) and Right ( LeftWords ( ~thisFieldType ; 1 ) ; 4 ) ≠ "Calc" ;
Get ( CurrentHostTimestamp ) & ": " & Get ( AccountName ) & " changed ˂" & ~thisField & "˃" & // Wrapping with "arrowhead" characters
Case ( MiddleWords ( ~thisFieldType ; 2 ; 1 ) ≠ "Container" ; " from " & Quote ( ~prevValue ) & " to " & Quote ( GetField ( ~thisField ) ) )
) ;
Excelisys_ChangeLog ( MiddleValues ( fieldList ; 2 ; ValueCount ( fieldList ) ) ; changelog; exclusions ) // Call the custom function again for all remaining fields in the list
& ("-------------------------------------------")
)
)
)