A number of different methods can be used to restrict access to a single field or group of fields on a form. One method is to restrict access based on a role created in the ACL. After the role is created, it can be integrated into the design of the database and used to manage access to a field or group of fields. In other words, you can selectively permit access to the design element based on the users name or, more importantly, the role assigned to the user.
One way to manage the display of or ability to edit content at an individual field level is through the use of "Hide When" formulas. Using this approach, you can set "Hide When" formulas for each field to determine if the field is visible or editable.
A.19.3 |
Note
Hiding a field should not be considered a "security" feature. A proficient Lotus Notes user will still be able to view the field value by using the document properties dialog. He or she may also be able to modify the content via a local database or by using agents depending on the ACL settings or if Enforce a consistent ACL across all replicas is disabled. If you are looking for a more secure implementation, consider a controlled section or the inclusion of an Authors field.
The following illustrates how to create a controlled section on a form. With controlled sections, only select IDs, groups, or roles can edit or access content in the section.
@If (Status = "Draft"; @UserName; Status = "Submitted"; "[TeamLead]"; Status = "Approved"; "[Procurement]"; Status = "In Process"; "[Admin]"; "")
In this example, the people authorized to edit the fields in the section are managed in the following sequence.
The document author can edit the initial document when the status is "Draft".
The team lead can edit it when the document is "Submitted".
The procurement person can edit it when the document is "Approved".
The administrator can edit it when the document is "In Process".
No one is allowed to edit the document after the document is complete.