Designing fields
A field is the part of an application that collects data. You create fields on forms, subforms, or in layout regions. Each field stores a single type of information. A field's field type defines the kind of information a field accepts, such as text, numbers, dates, or names. When a user, either in a Notes® client or a Web browser, creates a form, fills out the information in the fields, and saves the form, the data in the fields is stored in an individual document. The contents of the fields can then be displayed in documents and views or can be retrieved for use in formulas. A field can be used on a single form, or you can create shared fields for use in multiple forms in a database.
You can create a single-use field on a single form, or a shared field to use on several forms. In either case, you must specify the following:
- Field name
- Field type
- Whether this field is editable or computed
- Creating a single-use field
- Creating a shared field
- Field names and labels
A field name is a required element. You assign a field name in the Field Properties box when you create the field. You an also create a field label outside the field. A field label is descriptive text you create that appears with or covers the field on the form, and helps the user understand the field. Label text might name a field -- for example: To, From, Author, Subject, or Date. Or it might describe a user action -- for example, "Enter a product name." - Field types
The field's field type determines what type of information it can contain. You define the field type in the Field Properties box. The field types are: - Text, rich text, and rich text lite fields
To collect, store, and display text in a field, create a text field, rich text field, or rich text lite field. - Number fields
Use Number fields for numeric and currency data. - Date/Time fields
- Names fields
- Readers and Authors fields
Reader and Authors fields allow you to control who can read and create documents created from a form. - Creating fields to display lists of choices
You can create fields that present users with a list of choices. The list can be generated by a formula you enter or can be created by users who enter values. Enter lists and formulas for choice fields on the Control tab of the Field Properties box. If available for the interface style, you can select "Allow values not in list" on the Control tab of the Field Properties box to let users add their own words without changing the original list. Also, some of the interface styles have an option to "Allow multi-values" on the Field Info tab which let users select several choices in the field. Choice list fields can be editable or computed; however, most choice list fields are editable. The field types that present lists of choices are: - Generating choices for lists
- Creating aliases for choices in a list
You can create aliases for choices, so that if the word itself changes, any formula referencing the field still works. You can also create short aliases for long words to keep formulas more concise. Aliases are also useful if your application is to be translated, since only the choices themselves need to be translated and formulas don't need to be rewritten. Enter the alias using | (a vertical bar) followed by the alias. For example, A is the alias for All in this entry: - Password fields
A Password field is a text field that maintains a user's privacy by displaying each character a user enters as an asterisk on the screen. The contents of the Password field are not secure, and the data is visible in the Document Properties box from the Notes client. There are several ways to secure the contents of a Password field. If you are using the Password field as a method for securing an application, the best way to secure the contents of a Password field is not to save the contents after the entry is verified. This can be done using a formula that clears the field once it's been verified. You can use the input translation event or a LotusScript® QuerySave event. - Formula fields
Formula fields are used to populate a subscription list, which works in conjunction with the Headlines.nsf database. The Headlines database is used as the home page of a Notes client. The Headlines database includes a feature called subscriptions. Each database designer has the option enabling a database for subscriptions. When a user subscribes to a database (by choosing Create - Subscription), it triggers a server task that will notify the user whenever a document of interest is saved in that particular database. The criteria that the server looks for is contained in a formula field on the subscription form. Although users fill out the subscription form in the database they want to subscribe to, the subscription documents are stored in users' headlines databases (the default is headlines.nsf) on their local client. - Color fields
A color field lets you display a color picker on a form. When the user clicks the down arrow of a color field, a color chart appears with two tabs. The user can choose a color using either tab. - Time zone fields
A time zone field lets you display a drop-down list of all available time zones in the world, including the local time zone. Each time zone listed includes a partial list of the cities or locations found in that time zone. - Editable and computed fields
You choose whether a field is editable or computed in the field properties box, when you create the field. If a field is editable, a user can enter or change the value of the field. If a field is computed, a formula calculates the field value. Users can't change the values in a computed field. Number, date/time, authors, readers, and names fields are usually computed. Text, rich text, and choice list fields are usually editable. - Hiding fields
Use hidden fields to perform interim calculations or to store information you do not want users to see. In the Domino Designer templates, hidden fields appear at the end of forms, preceded by the heading "Hidden fields." - Creating a field in a layout region
- Adding HTML attributes to a field
- Storing HTML in a field
- Controlling the HTML generated for a field
- Creating fields that inherit values
- Standard fields used in templates
The following fields are frequently used in the templates that ship with Domino Designer. You may want to follow the same standards in databases you design to maintain consistency and make it easier to share information between forms. - Predefined fields with built-in functionality
Domino Designer provides predefined fields which automatically add functionality that you would otherwise have to program yourself. For example, to design a form with mailing options, you add predefined mail fields such as SendTo and CopyTo to a form. Designer recognizes the fields and provides the interaction with the mail router that routes and delivers the mailed document. - Reserved fields that control mailing options
To build mailing options into a form, create fields that have reserved names in Domino Designer. When you create a field with one of these reserved names, built-in programming takes care of the task for you. The fields can be text or choice list fields that use predefined values. - Fields for version tracking
- Designing fields that prompt users to select folders