Domino 9 und frühere Versionen > Entwicklung

PROB mit dem Feld vom Typ Namen

<< < (2/2)

masterste2000:
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!

Axel:
Das hier habe ich in der Designer-Hilfe gefunden, ohne lange zu suchen.


--- Zitat ---  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 )


--- Ende Zitat ---


Axel

koehlerbv:

--- Zitat von: masterste2000 am 31.03.06 - 10:20:56 ---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!

--- Ende Zitat ---

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

Navigation

[0] Themen-Index

[*] Vorherige Sete

Zur normalen Ansicht wechseln