Das Notes Forum
Domino 9 und frühere Versionen => Entwicklung => Thema gestartet von: masterste2000 am 30.03.06 - 11:31:39
-
Hallo,
Ich habe da ein Prob mit dem Feld vom Typ Namen!
Ich erstelle mir eine Liste von Mail-Adressen und möchte diese in ein Feld vom Typ NAMEN
übergeben. Wenn ich die Übergabe in einem Skript ausführe, wird nur der Erste Name aus der Liste in das Feld geschrieben!
Folgende Skriptversuche habe ich probiert:
1.
........hier wird die Liste befüllt
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument
uidoc.EditMode = True
Call uidoc.FieldSetText("EnterSendto", Liste) :-:
2.
........hier wird die Liste befüllt
Dim db2 As New NotesDatabase( "", "names.nsf" )
Dim view2 As NotesView
Dim doc2 As NotesDocument
Dim item As NotesItem
Set view2 = db2.GetView( "Groups" )
Set doc2 = view2.GetFirstDocument
While Not ( doc2 Is Nothing )
Set item = doc2.ReplaceItemValue( "ListDescription", Liste )
'Das Feld ListDescription vom Typ TEXT lässt sich mit der Liste befüllen
Set item = doc2.ReplaceItemValue( "Members", Liste)
'Das Feld Members vom Typ NAMEN lässt sich NICHT mit der Liste befüllen >:( :-:
Call doc2.Save( True, True )
Set doc2 = view2.GetNextDocument( doc2 )
Wend
Wo liegen mein Fehler?
Ich hoffe mir kann da jemand auf die Sprünge helfen!!!!!
DANKE
-
Was ist denn Liste ? Ein String, ein Array ?
-
Sind bei dem Feld Mehrfachwerte zugelassen?
Axel
-
Liste -> ist vom Typ String
Beim Feld sind Mehrfachwerte zugelassen!
Wenn ich ein Array brauche kannst du mir ein Beispiel geben in einer While Schleife, denn ich habe
so was noch nicht benutzt!!!
DANKE
-
Schua mal in die Designer-Hilfe, unter Lotus Script -> Schleifen oder Array, da findest Du wunderbare Beispiele.
-
MOIN MOIN,
ich versuche immer noch ein Feld vom Typ NAMEN mit mehreren Einträgen aus einer Liste zu befüllen, aber das gelingt mir nicht!!!
Konnte über die Designer-Hilfe kein passendes Beispiel finden!
Kann mir jemand ein Skript-Beispiel geben!
-
Das hier habe ich in der Designer-Hilfe gefunden, ohne lange zu suchen.
1. This script adds two new items to a document: a number item called EstimatedCost with the value 89, and a text item called Region with the value "Pacific Rim."
Dim doc As NotesDocument
'...set value of doc...
Dim itemA As NotesItem
Dim itemB As NotesItem
Set itemA = doc.AppendItemValue( "EstimatedCost", 89 )
Set itemB = doc.AppendItemValue( "Region", "Pacific Rim" )
Call doc.Save( False, True )
2. This script achieves the same result using the extended class syntax. The difference is that if an item with the name EstimatedCost or Region already exists in the document, its value is replaced by the new value.
doc.EstimatedCost = 89
doc.Region = "Pacific Rim"
Call doc.Save( False, True )
3. This script creates a new text item called Contacts in a document, and adds three new values to it.
Dim doc As NotesDocument
'...set value of doc...
Dim stringArray ( 1 To 3 ) As String
stringArray( 1 ) = "Chrissa Ehrhardt"
stringArray( 2 ) = "Allegra Pisarro"
stringArray( 3 ) = "Esteban Garcia"
Call doc.AppendItemValue( "Contacts", stringArray )
Call doc.Save( False, True )
4. This script achieves the same result using the extended class syntax. The difference is that if an item called Contacts already exists in the document, its value is replaced with the values Chrissa Ehrhardt, Allegra Pisarro, and Esteban Garcia.
Dim stringArray ( 1 To 3 ) As String
stringArray ( 1 ) = "Chrissa Ehrhardt"
stringArray ( 2 ) = "Allegra Pisarro"
stringArray ( 3 ) = "Esteban Garcia"
doc.Contacts = stringArray
Call doc.Save( False, True )
5. This script creates a new time-date item called DueDate in a document. It has the value 08/15/95 12:00:00 AM.
Dim doc As NotesDocument
'...set value of doc...
Call doc.AppendItemValue("DueDate", _
Datenumber(1995, 8, 15))
Call doc.Save( False, True )
6. This script achieves the same result using the extended class syntax. If an item with the name DueDate already exists on the document, its value is replaced with 08/15/95 12:00:00 AM.
doc.DateDue = Datenumber( 1995, 8, 15 )
Call doc.Save( False, True )
Axel
-
ich versuche immer noch ein Feld vom Typ NAMEN mit mehreren Einträgen aus einer Liste zu befüllen, aber das gelingt mir nicht!!!
Konnte über die Designer-Hilfe kein passendes Beispiel finden!
Kann mir jemand ein Skript-Beispiel geben!
Drei Sätze, aber fünf Ausrufezeichen, und das bei einer Bitte um Hilfe ... Stil hat das nicht.
Wir wissen bisher noch nicht, wie Du überhaupt die Variable "Liste" füllst und von welchem Typ diese ist. Du schreibst zwar "String", aber das wäre ja ein skalarer Wert und ich kann mir einfach nicht vorstellen, dass Du so naiv bist, dass "einfach so" aus einem skalaren Wert ein Array wird.
Poste also bitte den Code, mit dem Du zu "Liste" kommst. Dann wird sich die Lösung ganz schnell finden.
Bernhard