Domino Code Fragment

Code Name*
Track who changed a critical field.
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.223.21.5
Description*
How do you track who changed a critical field?
Type*
Formula
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
If you want to add an audit trail of the modifications made to a critical field named
"PRIORITY" it can be done with the following:

1) Create a duplicate "PRIORITY" field (named "PRIORITYDelta") that is hidden and has in
its input translation formula a statement to store the contents of the PRIORITY field.
This will retain the contents of the priority field before editing in a
current session.

2) Create a multi-value field ("Updatesto") with a formula that compares PRIORITY to
PRIORITYDelta when the document is being saved and when the condition is right
(i.e. PRIORITY != PRIORITYDelta) attaches the new save information to the field:

feed := @Name([CN]; @V3UserName) + " on " + @Text(@Date(@Now)) + " at " + @Text(@Time(@Now)) + "     " +  PRIORITY;
FIELD Updatesto := @If(@IsDocBeingSaved & PRIORITY != PRIORITYDelta ; Updatesto : feed; Updatesto);
Updatesto