You might have a Purchasing application where employees fill out Purchase Requests for office supplies. You can have your Notes application look up this information and automatically insert it into documents.
Mary Tsen composes a Purchase Order. The P.O. Number, Date, and Requested By fields are filled in automatically by Notes. Mary fills in the details of the purchase order: quantity, part number, and so on.
When Mary saves the Purchase Order, the delivery information in the lower half of the document is calculated using a series of @DbLookup formulas to retrieve information about that user from the public Name & Address Book:
This is accomplished by using computed fields and writing a lookup formula for each field to be retrieved (Location and Telephone). For example, the formula for the Location field would be:
@DbLookup("";"Purchasing":"Names.NSF";"People"; @Right(RequestedBy; "");"Location")
This formula instructs Lotus Domino to open the Name & Address Book (Names.NSF) on the Purchasing server, locate the People view, and then locate the person whose last name matches the last name in the purchase orderfs RequestedBy field. Once the correct document has been located, Lotus Domino copies the information from the Person documentfs Location field into the purchase order Location field.
A similar formula then copies Maryfs telephone number from the Person record OfficePhoneNumber field into the purchase order Phone field.
Note For the DeliverTo field, Maryfs name is determined when the document is composed, using @UserName.