title image


Smiley Re: doppelte Einträge finden
Hallo Mattu,



wenn Du das nächste Woche testen willst, hier das Script eines Agenten, der in etwa das macht, was Du möchtest. Er schreibt die zusammengeführten Docs aber in eine neue Maske und Ansicht.



Gruß und schönes Wochenende

FPN60



Dim session As New NotesSession

Dim ws As New NotesUIWorkspace

Dim db As NotesDatabase

Dim col As NotesDocumentCollection

Dim view As NotesView



Dim doc As NotesDocument

Dim docneu As NotesDocument

Dim dockey As NotesDocument

Dim doccol As NotesDocument



Dim key As Variant

Dim key1 As String



Dim temp As Variant

Dim temp2 As Variant

Dim item As NotesItem

Dim itemneu As NotesItem



Dim i As Integer



Set db = session.CurrentDatabase

Set view = db.GetView("Import")



Set doc = view.GetFirstDocument

If doc Is Nothing Then

Messagebox "In der Ansicht wurden keine Dokumente gefunden.", 64, MB_OK

Exit Sub

End If



key = doc.GetItemValue("im1")

key1 = key(0)









While Not doc Is Nothing



Set col = view.GetAllDocumentsByKey(key1)





Set doccol = col.GetFirstDocument()

i=1



Set docneu = db.CreateDocument

Call doccol.CopyAllItems( docneu, True )

Call docneu.ReplaceItemValue("im2", "")

Call docneu.ReplaceItemValue("Form", "Importneu")



Call docneu.Save(True, False)



count% = col.count

While Not doccol Is Nothing



temp = doccol.GetItemValue("im2")

Set itemneu = docneu.GetFirstItem("im2")

Call itemneu.AppendToTextList(temp)

Call docneu.Save(True, False)



i=i+1



Set doccol = col.GetNthDocument(i)



Wend



Call col.RemoveAll(True)



Set doc = view.GetFirstDocument()

If doc Is Nothing Then

Messagebox "Alle Dokumente wurden bearbeitet", 64, MB_OK

Exit Sub

End If

key = doc.GetItemValue("im1")

key1 = key(0)

Wend

geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: