Domino 9 und frühere Versionen > Entwicklung

Feldnamen Variable ansprechen

(1/2) > >>

Gruenkohl:
Hi,

ist es möglich, dass ich Feldnamen variable anspreche.

Beispiel:

Feld_01, Feld_02, Feld03,...

For i = 1 to 5
  Feldwert = doc.Feld_0 & i & "(0)"
next

Ich bekomme das nicht hin, ist es grundsätzlich möglich?
Ein Beispiel wäre super.

Danke

Andreas

klaussal:
Dim strVar As String
Dim strVar2 As String
Dim i As Integer
   
Set uidoc = ws.currentDocument
i = 1
Set doc = uidoc.document
strVar = "feld_"  + Cstr(i)

strVar2= uidoc.FieldGetText(strVar )

Gruenkohl:
Ich habe kein UIDOC!

rar:
Probiers mit
for i = 1 to 5
   set item = doc.GetFirstItem("Feld_0" + Cstr(i))
   Feldwert = item.Values(0)
Next

HTH
-dani

Axel:
Hi,

es geht noch einfacher:

Dim Feldwert As Variant

for i = 1 to 5
   Feldwert = doc.GetItemValue("Feld_0" + Cstr(i))
Next



Axel

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln