In Notes/Domino, fields are used to enter, modify, and display data stored in items. (Item is the technical name for a discrete data element stored in a Notes document.) Fields can be used in forms, subforms, and layout regions and layers and can be either single-use fields or shared fields. (Each is explained in the following sections.) Three key criteria must be specified when creating fields: the field name, the data type of the field, and the field type.
Each field on a form must have a unique name. If you are using subforms in a form, this rule also applies. In addition to using a unique name for each field, you should keep the following points in mind:
Field names cannot exceed 32 characters in length.
Field names cannot contain spaces. You can use underscores (_) instead.
Field names should not begin with a dollar sign ($), because this character is usually reserved for special Notes system fields.
Field names cannot begin with a number (1–9).
Field names cannot contain the ampersand symbol (&).
The Notes database architecture supports a wide range of data types for fields. The data type of a field specifies the type of data that can be stored in a field. The various data types supported in Domino 6 are explained in Table 4.12.
The field type is another key setting involved in adding fields to a form. The Designer supports four field types:
Computed— Value is the result of a formula and is stored in the document. It is recomputed when the document is opened, refreshed, or saved.
Computed for Display— Value is the result of a calculation, but the value is not stored in the document. It is recomputed when the document is created, opened, refreshed, or saved.
Computed When Composed— Value is the result of a calculation, and the value is stored in the document.
Editable— Value is entered by the user and is stored in the document. A default formula can be used to populate the field when a document is created, and input translations and field validation formulas can be used to manipulate data when the document is saved and to validate data when it is refreshed.
Before you add fields to a form, it is prudent to consider the following:
The type of data to be stored in the field
The method the user will use to interact with the field, such as combo box versus radio button versus text field
The most logical position for the field on the form
The need for security on the field
The need to conditionally hide the field
The presentation of the field, including font size, face, and color
A single-use field can be used only in the form or subform that hosts it. To create a single-use field, follow these steps:
1. | Open the form or subform in which you want to add the field. |
2. | Position the cursor to the spot where you want the field to appear. |
3. | Choose Create, Field, which inserts a new unnamed field and opens the Field properties box to the Info tab (see Figure 4.11). Figure 4.11. The Info tab on the Field properties box enables you to define the basic properties of a field. |
4. | On the Info tab, enter the following information:
|
5. | Select the Control tab (2nd tab) to choose the display options for the field. The choices presented on this tab vary widely, depending on the type of field you have elected to create. Be sure to check the settings for the field you are creating. |
6. | Select the Advanced tab (third tab) and, if necessary, enter a help description. If the field is set to display multi-values, configure the multi-values options. The font settings for a field are fairly self-explanatory and are not covered in detail. You can also set security options such as signing and encryption here. |
7. | Select the Fonts tab if you want to format the font of the field. The font settings for a field are pretty much self-explanatory and are not covered in detail. |
8. | Select the Paragraph Alignment tab to control the alignment of the field within its paragraph. The alignment settings for a field are pretty much self-explanatory and are not covered in detail. |
9. | Select the Hide When Options tab to control the conditions under which the field is to be visible. By default, a field is always visible. Be sure to configure the hide-when settings if the new field you are creating should not be visible at all times. |
10. | Select the Field Extra HTML tab to enter HTML-specific attributes for the field, such as class and style, which allows developers to use cascading style sheets. |
11. | Save the form or subform. |
12. |
To modify a single-use field, follow these steps:
1. | Open the form or subform in which you want to add the field. |
2. | Position the cursor to the spot where you want the field to appear. |
3. | Double-click the field you want to edit. |
4. |
The following is a list of tips to help you in troubleshooting single-use fields:
Check the field properties to ensure the field is set to the proper data type.
Ensure that the type of field is set correctly. For example, if the field value should be saved as an item in the document, but is not, be sure that you have not set the field to be Computed For Display.
If you are planning to store multiple values in a field, be sure that the field has the multi-values property enabled.
If the field is of type keywords, but you are not getting the correct values in the list, check the formula being used to generate the list.
If the field is computed and the computations are based on other fields in the form, be sure to check the order of the fields. Remember that in Notes, fields are computed from left to right and top to bottom.
Field Help and Field Hints provide users assistance when filling out a form. Field Help creates a one-line row at the bottom of the form that displays custom messages that tell the user how to use the field. Field Hints appear as a default value in the field that goes away when the user enters the field.
Field help text and Field hint text work only on the Notes client, not on the Web. |
To add either Field Help or Field Hints to a field, follow these steps:
1. | Open the form that contains fields to which you want to add field help and/or field hints. |
2. | Select a field on the form. |
3. | Double-click the field, which opens the field properties box. |
4. | Click the Advanced tab (propeller beanie). |
5. | Enter Field Help text in the Field Help field or enter Field Hint text in the Field Hint field. |
6. |
3.138.35.229