INECO Forum Overzicht Overzicht Aanmelden Aanmelden Registreer Registreer Profiel Profiel Ledenlijst Ledenlijst Groepen Groepen Zoeken Zoeken

Nieuw in 8.5: StampAllMulti - een voorbeeld hoe te gebruiken...
 
 
 
 
 Geplaatst   Bericht 
Marcel Rothuizen

Marcel Rothuizen
 

Aanmelddatum: 10-11-2000
Woonplaats: Heteren (Gld)
Datum: 14-01-2009 14:59:39    Bericht: Nieuw in 8.5: StampAllMulti - een voorbeeld hoe te gebruiken...

De nieuwe methode StampAllMulti voor de NotesDocumentCollection en NotesViewEntryCollection classes is een waardevolle aanvulling!
Nu kunnen we zeer snel meerdere velden in een documentenreeks van een nieuwe waarde voorzien.

Omdat er in de Lotus 8.5 Designer Help geen voorbeeld staat voor het gebruik post ik het even hier.
In dit geval maken we een document collectie door alle documenten in een view te selecteren, maken een nieuw (tijdelijk) document, vullen het document met een paar velden en roepen
de methode StampAllMulti aan om de velden uit het tijdelijke document te kopieren naar alle documenten in de collectie. Snel en effectief!

Voorbeeld:

Sub Initialize
 Dim session As New NotesSession
 Dim db As NotesDatabase
 Dim view As NotesView
 Dim vc As NotesViewEntryCollection
 Dim doc As NotesDocument
 
 Set db = session.CurrentDatabase
 Set view = db.GetView("StampMulti")
 Set vc = view.AllEntries
 
 Set Doc = db.CreateDocument
 Doc.ReplaceItemValue("Company","INECO").IsSummary = True
 Doc.ReplaceItemValue("Address","Hoge Riem 27").IsSummary = True
 Doc.ReplaceItemValue("Zipcode","6666JA").IsSummary = True
 Doc.ReplaceItemValue("City","Heteren").IsSummary = True
 Doc.ReplaceItemValue("Country","The Netherlands").IsSummary = True
 Doc.ReplaceItemValue("Phone","+31653353140").IsSummary = True
 Call vc.StampAllMulti( Doc )
 
End Sub

Uit de Help:

 

 

Replaces the values of specified items in all documents associated with the entries in a view collection.

Note

This method is new with Release 8.5.

Defined in

 

 

NotesViewEntryCollection

Syntax

Call

notesViewEntryCollection.StampAllMulti( document

)

EN

Parameters

document

NotesDocument. The document contains multiple items, each with values appropriate for the item type.

Usage

If an item does not exist, it is created. If the item is of a different data type, the existing item will be deleted and a new item of the new data type created.

The item values are immediately written to the documents on the server. You do not have to use the Save method of NotesDocument after StampAllMulti. However, any documents modified by your script must be saved before calling StampAllMulti.

This method does not modify existing NotesDocument objects. Documents must be retrieved again to see the changes.

If you do not have the proper access to modify one or more of the documents in the view entry collection, this method will return ERR_NOTES_STAMP_FAILED. Only those documents you are able to modify will be stamped.

 E-mail Website ICQ MSNM Skype Hyves LinkedIn 
Zoek in afgelopen ok
 
   Overzicht / Lotus Notes Ontwikkeling / Lotusscript  
Pagina 1 van 1 

IBM LOTUS NOTES migratie doet u samen met INECO

Powered by Lotus Domino R8.5.3 on Fedora Core 14 Dit  forum is gemaakt door Intranet &  Network Consultancy. © 2011.
Voor vragen of opmerkingen  kunt u contact opnemen met:  .
Deze site is gemaakt met Lotus Notes R8.5.3 en draait op Fedora Core 14.

INECO Support Contract banner