logo

New Response

« Return to the blog entry

You are replying to:

    • avatar
    • hora_ce
    • Posted on Wed 19 Oct 2011 01:15 PM

    I'm into performance every time I write code...

    Instead of getting the values using the . notation, I would use the getitemvalue method. (kept me away of nasty issues when there are field names the same as a property of the notesdocument objects.

    Also, there are cases in which there are lots of documents, in that case there may be helpful to store a temporary value of the key field value (in this case, there would be less requests to field values from document)

    something like

    dim vTmp as Variant

    While Not(doc Is Nothing)

    vTmp = doc.getitemvalue("GroupUNID")(0)

    If Not IsElement(Groups(vTmp)) Then

    Groups(vTmp) = doc.getitemvalue("GroupName")(0)

    End if

    Set doc = collection.GetNextDocument(doc)

    Wend

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: