On 04/04/2007, at 12:52 am, Robert Sandkam wrote:
Is there a way to use the login info to automatically stamp each
record with the last user to make a change.
Create a text field and set the auto-enter options for the field to
enter the Modification: "Account Name". The Account Name is the
user's login name; you can also select Modification: Name to insert
the User Name from FileMaker's preferences (this is often used to
identify a particular machine as opposed to a particular user).
Is there a way to keep a log/record of changes to each record?
You can make use of the Evaluate function for this: specifically, its
ability to "keep an eye" on a list of fields you specify:
Format
Evaluate(expression{;[field1;field2;field3;...]})
Parameters
expression - any text expression or text field.
fields - a list of fields that this function is dependent on. When
these fields are modified, the calculation will update its result.
You would create a text field (eg, "RecordLog") and set its Auto-
Enter options to a calculation something along the lines of:
RecordLog =
Evaluate (
Quote (
Get ( CurrentTimeStamp ) & ": "
& Get ( ActiveFieldContents )
& "ΒΆ" & RecordLog
);
[ Field1; Field2; Field3 ] )
... where that last line lists the names of the fields you want to
track changes for.
Note that you need to watch out for the field option "Do not evaluate
if all referenced fields are empty": if this is turned on, the above
function won't work, because to start with the "RecordLog" field will
be empty and so the calculation won't be evaluated. To get around
this, you should also turn on one of the other auto-enter options for
the RecordLog field--for instance, to auto-insert "Creation: Account
Name" or "Creation: Timestamp". That way, there will always be a
value in the field in new records. Of course, you would need to enter
a similar "starting" value in any pre-existing records in your database.
--
Tim Mansour <[EMAIL PROTECTED]>
Neologica Print & Promotions (ABN 63 904 335 408)
159 Commonwealth Street Surry Hills NSW 2010
Sydney 02 9212 1789 Melbourne 03 9012 7441 Mobile 0405 500 846