The $KeepPrivate field is a special Lotus Notes field that manages the ability to copy, print, and forward documents in a database. When enabled, the associated menu options and shortcut keys are disabled. This prevents the user from performing any of these actions. This feature is often implemented as a means to manage the dissemination of information.
This is a built-in feature of the Lotus Notes client. Users will not be able to copy, print, or forward any document that includes the $KeepPrivate field where its value is set to a text string "1".
Note
This field does not prevent users from reading the document. To manage who can read a document, consider implementing the $KeepPrivate field in conjunction with a Readers field. See Chapter 19, "Security," for additional information pertaining to document security.
This feature can be implemented by using static or dynamic field values. When implemented with a static value, the copy, paste, and print functions are disabled for all documents, and the setting cannot be changed. Using a dynamic approach, the setting can be toggled between enabled and disabled by using a checkbox, radio button, action button, and so on.
This first example illustrates the static approach. To implement this technique, complete the following instructions.
Step 1. | Create a field on the form. |
Step 2. | In the field properties dialog, name the field $KeepPrivate and set the field type to either Computed or Computed when composed. |
Step 3. | In the Programmers pane, insert the following formula in the Value section for the field. "1" |
This second example illustrates the dynamic approach. This approach will allow users to enable or disable the copy, paste, and print features on a document-by-document basis. To implement this technique, complete the following instructions.