Domino 9 und frühere Versionen > ND8: Entwicklung
Entfernen Eintrag aus Feld mit Mehrfachwerten
andrösen:
Vielen Dank für die schnelle Hilfe!
Ich habs erstmal mit dem Fulltrim umgesetzt. Den Replace-Tipp werd ich die Tage nochmal testen.
Anbei die umgesetzte Lösung.
Gruß Sascha
--- Code: ---Sub Click(Source As Button)
'Deklaration
Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim uiview As NotesUIView
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim dc As NotesDocumentCollection
Dim collection As NotesDocumentCollection
Dim item As NotesItem
Dim NameVeranstaltung As String
Dim MyWert As Variant
Set db = session.CurrentDatabase
Set uiview = workspace.CurrentView
Set collection = uiview.Documents
Dim charNew As String
Dim charOld As String
Dim varNewEvents As Variant
'VeranstaltungDoc deklarieren & Veranstaltung auslesen
Set uidoc = workspace.CurrentDocument
NameVeranstaltung = uidoc.FieldGetText( "ThemaVeranstaltung" ) ' z.B. "XMAS"
'Erstes Dokument
Set doc = collection.GetFirstDocument
'Schleife zum setzen des Event-KZ
While Not (doc Is Nothing)
Set item = doc.GetFirstItem( "events" )
If item.Contains( NameVeranstaltung ) Then
varNewEvents = Fulltrim( Replace( doc.GetItemValue( "events" ) , NameVeranstaltung , "" ) )
'Print varNewEvents
Call doc.ReplaceItemValue ( "events" , varNewEvents )
Call doc.Save( False, True )
End If
'Nächstes Dokument
Set doc = collection.GetNextDocument(doc)
Wend
workspace.ViewRefresh
End Sub
--- Ende Code ---
Navigation
[0] Themen-Index
[*] Vorherige Sete
Zur normalen Ansicht wechseln