Disable the Ability to Print, Copy, Cut, and Forward Documents

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.

How It Works

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.

ImplementationExample 1

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"


ImplementationExample 2

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.

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 Checkbox and Computed. Switch to tab 2. Select the Enter choices (one per line) option and add this formula to the field properties dialog (see Figure 17.1).

Prevent copying and printing | 1


Figure 17.1. Example field choice setting to disable copying and printing


This will produce a field on the form that looks like Figure 17.2.

Figure 17.2. Example of the disable copying and printing checkbox




An Introduction to the Lotus Domino Tool Suite

Getting Started with Designer

Navigating the Domino Designer Workspace

Domino Design Elements

An Introduction to Formula Language

An Introduction to LotusScript

Fundamentals of a Notes Application

Calendar Applications

Collaborative Applications

Reference Library Applications

Workflow Applications

Web Applications

Design Enhancements Using LotusScript

Design Enhancements Using Formula Language

View Enhancements

Sample Agents

Miscellaneous Enhancements and Tips for Domino Databases

Data Management

Security

Application Deployment and Maintenance

Troubleshooting

Appendix A. Online Project Files and Sample Applications

Appendix B. IBM® Lotus® Notes® and Domino®Whats Next?



Lotus Notes Developer's Toolbox(c) Tips for Rapid and Successful Deployment
Lotus Notes Developers Toolbox: Tips for Rapid and Successful Deployment
ISBN: 0132214482
EAN: 2147483647
Year: N/A
Pages: 293
Authors: Mark Elliott

Similar book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net