Lotus Software logo
IBM Lotus Domino Designer 8.5
  Versions 8.5 and 8.5.1






Examples: @DbLookup (Domino data source)

  1. Your organization maintains employee office location and department information in the Person documents in the public Name & Address Book.
  2. 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 order's RequestedBy field. Once the correct document has been located, Lotus Domino copies the information from the Person document's Location field into the purchase order Location field.

    A similar formula then copies Mary's telephone number from the Person record OfficePhoneNumber field into the purchase order Phone field.

    Note For the DeliverTo field, Mary's name is determined when the document is composed, using @UserName.

  3. Using the Name & Address Book again, you want to retrieve a list of office telephone numbers for everyone in the Purchasing department.
  4. You could use @DbLookup with the key "Purchasing" to retrieve the OfficePhoneNumber field, and Notes would return the telephone number for every employee with "Purchasing" entered in the Department field of their Person record. The phone numbers are returned as a text list, using the selected multivalue separator for the field.

  5. This formula returns the value stored in the Status field of the Virus Check document, which is accessed via the In Progress view of the PROJECTS.NSF database stored in the SMITH subdirectory on the RESEARCH server. The information will not be cached, so if this formula is evaluated again during the same Notes session, a new lookup will be performed to ensure that the status retrieved is up to date.
  6. @DbLookup("":"NoCache";"RESEARCH":"SMITH\\PROJECTS.NSF"; "In Progress";"Virus Check";"Status")
Related topics
@DbLookup (Domino data source)




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009