Das Notes Forum
Domino 9 und frühere Versionen => Entwicklung => Thema gestartet von: Diehler am 23.01.03 - 15:04:40
-
Kann mir mal jemand bitte ein Quellcodebeispiel geben, wie ich ein neues NotesItem mit einem Text drin anlege. In der Hilfe hab ichs net gefunden.
thx
-
auszug aus der noteshilfe :
1)This script creates three new items in a document: a text item, a number item, and a date-time item.
Dim doc As NotesDocument
Dim textItem As NotesItem
Dim numberItem As NotesItem
Dim dateTimeItem As NotesItem
'...set value of doc...
Set textItem = New NotesItem _
( doc, "Region", "South America" )
Set numberItem = New NotesItem( doc, "Earnings", 98 )
Set dateTimeItem = New NotesItem _
( doc, "LastAccessed", Today )
Call doc.Save( True, True )
2. This script creates a new text item in a document and gives it multiple values. The values in the text list are Bicycle, Train, and Foot.
Dim doc As NotesDocument
Dim textListItem As NotesItem
Dim newValues( 0 To 2 ) As String
'...set value of doc...
newValues( 0 ) = "Bicycle"
newValues( 1 ) = "Train"
newValues( 2 ) = "Foot"
Set textListItem = New NotesItem _
( doc, "Choices", newValues )
Call doc.Save( True, True )
3. This script creates a new Authors item in a document. The values in the item are Mariko Nakamura and Pierre Singer.
Dim doc As NotesDocument
'...set value of doc...
Dim newValues( 1 To 2 ) As String
newValues( 1 ) = "Mariko Nakamura"
newValues( 2 ) = "Pierre Singer"
Dim authorsItem As New NotesItem(doc, "docAuthors", _
newValues, AUTHORS)
Call doc.Save( True, True )
ps:
2+3:multivalue felder
gruss
-
Hi,
das Beispiel hab ich, unter einigen, in der Notes-Hilfe gefunden:
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 )
Axel