Working with Sections
Sections are used to group informationsuch as text paragraphs, files, tables, images, or fieldsthat can be expanded or collapsed. Using sections, you can visually group information or fields on a form to simplify the appearance or navigation experience for the end-user. For example, you may want to use sections to separate the various help topics in the "Using This Database" document. Sections can also be used to organize various data fields on a formsuch as a section for Software, Hardware, and Network Configuration.
There are two types of sectionsStandard and Controlled. A Standard section is accessible to all users, whereas a Controlled section enables you to manage the ability to view and edit information for the entire grouping.
Sections can be created on forms, subforms, pages, and database design documents such as "About This Database" and "Using This Database." Each section is composed of two elementsthe section title and section content.
Tip
In addition to creating sections in Notes applications, Standard sections can be created in the Lotus Notes client. Sections can be created in emails and calendar entries or within any Rich Text field.
When a section is created, the title and related content are grouped together. Sections can easily be identified by the triangle that appears to the left of the title. This is called a twistie. Clicking on the twistie will expand and collapse the section. The twistie also serves as a visual status indicator for the section. The twistie will point to the right when the section is collapsed and down when fully expanded.
For example, Figure 4.22 illustrates a standard section used to separate various help topics. It depicts three sectionstwo collapsed and one expanded.
Figure 4.22. Illustrates sections on a form
Tip
Sections are a good way to organize information presented in the "Using This Database" help document or to group related fields on a form.
Creating a Standard Section
The following describes how to create a standard section.
1. |
First specify a title for the section (e.g., How to Search the Database). Underneath the section title, add text paragraphs, tables, images, files, and other information.
|
2. |
Select all information, starting with the section title and including all associated information.
|
3. |
Select the menu options Create > Section > Standard.
|
Tip
Specifying a meaningful section name will help the user navigate the application.
Editing a Section
Using the properties dialog box, you can also change the default display and appearance settings. Sections can be set to automatically expand or collapse when the document is first opened, edited, or printed. You can also change the colors, fonts, and border graphics.
To edit the section, select or highlight the section. Then select the Section > Section Properties... menu options. This will display the properties dialog for the section, which includes four configuration tabs. The first tab enables you to modify the section title, color, and border style (see Figure 4.23). Using the border style, you can customize the appearance of the section.
Figure 4.23. Setting the border style
The second properties tab is used to set the expand and collapse rules for the section. Here you set the section to automatically expand or collapse when the document is previewed, read, edited, or printed. For example, you may want to collapse all sections when the document is previewed and expand all sections when the document is printed.
Three configuration options are available for each of the document modes: previewed, opened for reading, opened for editing, and printed.
- Don't auto expand or collapse Any time the document is accessed, the section will return to the prior stateeither expanded or collapsed. This is the default setting.
- Auto expand section Select this option to have the section automatically expanded when the document is accessed.
- Auto collapse section Select this option to have the section automatically collapsed when the document is accessed.
Finally, the remaining two property tabs enable developers to manage the font and permissions associated with the section. These tabs are standard across virtually all Domino object property windows.
Tip
Did you know that you can nest sections within sections? In other words, a single section may contain multiple subsections. This option allows you to further subdivide information and group content.
Sections, by default, are represented by the
Controlled Sections
Controlled sections work identically to standard sections with one exception. They enable the developer to manage access to the section content within an application. Take, for example, a Notes database used to submit and track workstation service requests. Using controlled sections, you can create a set of fields and instructions for the request information and a second set of fields and instructions for the solution information.
Based on this model, the author completes one section while the technician completes the other section. This approach manages who can edit the content and when. As a result, the technician can add information pertaining to the solution but cannot change the scope of the request. To further illustrate the power of controlled sections, the ability to edit the sections can also be tied to other fields on the formsuch as the document status. By adding the status to the controlled section rules, you can then prevent all updates after the status changes. For example, rules could be established to
- Allow the author to edit the request when in a DRAFT status
- Allow the technician to edit the solution when in a SUBMITTED status
- Disable editing for both author and technician when in a COMPLETE status
Note
The title of a controlled section cannot be computed, unlike a standard section.
Creating a Controlled Section
Follow these instructions to create a controlled section using the Domino Designer client.
1. |
First specify a section title (e.g., How to Search the Database) followed by text paragraphs, tables, images, files, and other information.
|
2. |
Select all section content.
|
3. |
Select the menu options Create > Section > Controlled Access.
Note Controlled sections are specific to application development using the Domino Designer. Controlled sections cannot be created in documents (such as emails or calendar appointments) in the Lotus Notes client. |
4. |
Immediately after the controlled section is created, the properties dialog window will be displayed in order to configure the controlled section. You'll notice that this property window varies slightly from that of the standard section, and it should really be considered more like an application design element rather than a method to format content. In other words, a controlled section is really a special type of field that resides on a form, page, or document. For this reason, the first properties tab now includes a Section Field Name field that is used to assign an object name to the design element (see Figure 4.24).
Figure 4.24. Controlled section field name A second notable difference is the Formula tab (or tab number three) in the properties window. This tab, which contains the Access Formula field, defines who can edit the section content (see Figure 4.25). This field must contain a valid formula or rule before you can save the newly created controlled section.
Figure 4.25. Access formula for a controlled section |
5. |
Click the Formula tab and specify a valid access formula. Access formulas determine who is permitted to edit the section content. Although you could hard-code a user's name (e.g., Mark Elliott/Raleigh/IBM), a more robust method would be to compute the editors based on a field value (such as Status = "DRAFT"), user role (e.g., person is a member of the "AdminGroup" role), or a combination of both. These options provide greater flexibility to manage access to the section via programmatic means. Refer to Chapter 19 for additional information pertaining to security settings and roles.
|
Note
The rules associated with a controlled section only apply to the content of the section. Objects, text, and fields outside the controlled section will not be affected by controlled section rules.