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






Examples: ColumnValues property

  1. You retrieve a document called currentDoc from a view that has two columns: the first shows the due date of a project (its column formula is the field DueDate), the second describes the project (its formula is "New Project: " + Description).
  2. On the currentDoc, the DueDate item contains 10/16/95 and the Description item contains "Ad Campaign for Acme." Therefore,

    currentDoc.ColumnValues(0) equals 10/16/95
    
    currentDoc.ColumnValues(1) equals _
    "New Project: Ad Campaign for Acme"
  3. You want to look up all the products in the Products view of an Inventory database. This script finds the view and then visits each document in the view to retrieve its first column value (which holds the product name). This is equivalent to performing an @DbColumn.
  4. server$ = "Tilburg"
    
    dbfile$ = "inventor.nsf"
    counter% = 1
    Dim db As New NotesDatabase( server$, dbfile$ )
    Dim view As NotesView
    Dim doc As NotesDocument
    Dim productList( 1 To 100 ) As Variant
    Dim currentProduct As Variant
    Set view = db.GetView( "Products" )
    Set doc = view.GetFirstDocument
    While Not ( doc Is Nothing )
    ' Get the value on the current document that shows up in
    ' view's first column
    ' Append this value to our productList array
    currentProduct = doc.ColumnValues( 0 )
    productList( counter% ) = currentProduct
    Set doc = view.GetNextDocument( doc )
    counter% = counter% + 1
    Wend
    ' There are now counter% - 1 items in the productList
Related topics
ColumnValues property




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009