APPLICATION DESIGN
Note There is no built-in function to synchronize the field values between the original document and the new document after creation. Inheritance only fills in initial field values. Keeping the documents synchronized if either is later edited would require custom code.
To inherit field values from a document in the IBM® Lotus® Notes® client, the document must either be open in the Notes client or highlighted in a view when composing the new document.
In web applications, the new document determines which document to inherit from based on the URL argument ParentUNID in the Domino URL command, for example:
Create fields that inherit information from another document to save users from unnecessary typing or to keep related documents consistent. Open the form that will be used to create the new document.
1. Choose Design - Form Properties.
2. In the Defaults tab, select "On Create: Formulas inherit values from selected document."
3. Create the fields that should inherit values. New fieldnames do not have to match the fieldnames whose values they inherit.
Formulas inherit the values of the parent document's fields. Fields do not inherit values, except through the use of formulas in their default or computed values. Using the same fieldname for a field on the new document is not sufficient to inherit the parent document's values of that field.
Inherited values from the parent document are only available while the new document is being composed. Once the new document has been created, and either saved or displayed for editing, the parent document's values are no longer available for use in formulas.
If a field on the new form shares a name with a field on the parent form, references to that fieldname in formulas preceding the field on the new form will use the parent form's field value. References to that fieldname in formulas after the field on the new form will use the new form's field value. For instance, suppose you had three fields on the new form, in this order:
Subject: Editable, default value formula "Re: " + Subject
OrigSubject2: Computed when composed, formula "Topic: " + Subject
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 (FirstName, LastName, Address) and a hidden computed field called FullName (with formula FirstName + " " + LastName).
The Letter form has an editable field Salutation whose default value formula is "Dear" + FullName, and an editable field Address whose default value formula is Address.
When Notes client users highlight a Company Profile document in a view and choose Create Letter, the Letter is already filled in with the recipient's address and salutation. The user can then edit these fields, if desired.
When Web users open the Company Profile document and click a button to create a Letter document, it works the same way.
Language cross-reference
See Also