APPLICATION DESIGN

Creating fields that inherit values
A field can inherit values from another document in the same database or from another field on the same form. A field that inherits a value from a field on the same form must be a computed field, placed below or to the right of the field it is inheriting from. Use the parent field's name as the value for the field formula. The form itself does not need the "Inherit field values" property set. To inherit a field value from another form, a Notes client user must have that form selected and a Web user must have the form opened or referenced in the Domino URL command, for example:
To create a field that inherits values from another document

Create fields that inherit information from another document to save users from unnecessary typing or to keep related documents consistent. Open the form.

1. Choose Design - Form Properties.

2. (Optional) To display the parent document to end users in the preview pane of the Notes client, click the Defaults tab, select "On Open: Show context pane" and select Parent.

3. Select "On Create: Formulas inherit values from selected document."

4. Create the fields that should inherit values.

5. Write a default value or computed field formula for each field that uses the parent document field name as the value. For example, to inherit the FullName field, use FullName as the inheriting field's formula.

Example: Inheriting address information

In a Customer Contacts application, a Letter form uses inheritance to copy information from a Company Profile document. The Company Profile contains name and address fields and a hidden field called FullName. The Letter form inherits the values of the name and address fields for the address block and uses the FullName field for the salutation.

When Notes client users highlight a Company Profile document and choose Create ­ Letter, the Letter is already filled in with the recipient's name, address, and the correct salutation.

When Web users open the Company Profile document and click a button to create a Letter document, the Letter is already filled in with the recipient's name, address and the correct salutation.

See Also