Column value

dear friends,i have a lotus script coding like this:

Sub Initialize

Dim session As New NotesSession

Dim db As NotesDatabase

Dim view As NotesView

Dim entry As NotesViewEntry

Dim vc As NotesViewEntryCollection

Dim doc As NotesDocument

Set db = session.CurrentDatabase

Set view = db.GetView(“vwIncompletedProjectEvent”)

Set vc = view.AllEntries

Set entry = vc.GetFirstEntry()

While Not (entry Is Nothing)

Set doc = entry.Document

Messagebox doc.txAdmin(0)

Set entry = vc.GetNextEntry(entry)

Wend

End Sub

but i have a trouble in txAdmin in “vwIncompletedProjectEvent” view because

txAdmin contain multi value.

then i got troubling because not all document appears.

i think the same document with the multi value in txAdmin appear twice or more . therefore it can not appear all document

to all friends who know the lotus script coding for my problem please reply this post.

thanx for answering my question

Subject: column value

Hello cen !If you want to get value from txAdmin, you should use NotesItem

Dim item as NotesItem

Set item = doc.GetfirstItem(“txAdmin”)

forall it in item.values

Messagebox it

end forall

If you do not need to get the whole notesdocument, you should use the “ColumnValues” property of the notesviewEntry

To get: valuesArray = notesViewEntry.ColumnValues

Hope this helps…

Fred

Subject: RE: column value

can i use valuesArray = notesViewEntry.ColumnValuesin my view with the same field value

Subject: RE: column value

What do you mean by “same field value” ?

Subject: RE: column value

i have troubling in my lotus script . here is my lotus script:

Dim session As New NotesSession

Dim db As New NotesDatabase

Dim view As NotesView

Dim entry As NotesViewEntry

Set db = session.CurrentDatabase

Set view = db.GetView(“vwIncompletedProjectEvent”)

Set entry = view.GetEntryByKey(“Adriani Halim”, False)

Forall txAdmin In entry.ColumnValues

col% = col% + 1

Messagebox txAdmin, "Column " & col%

End Forall

but then it appears msgbox “Type MisMatch”

am i wrong in my lotus script code?

if so may friend corret my code

the error line is in:

Forall txAdmin In entry.ColumnValues

thanx for answering my question

Subject: RE: column value

Il looks like it’s right;But you should write “Option Declare” at the top of your script.

Be sure that the 1st col of your view is sorted;

If you debug, you get the error when the script is for the first time on the “Forall txAdmin In entry.ColumnValues” instruction ?

Subject: RE: column value

no, the first time it show msgbox “Andriani Halim”. but the second time in “coding Messagebox txAdmin(0)” it show msgbox the “variant doesnot contain a container”

Subject: RE: column value

write Forall txAdmin In entry.ColumnValues

col = col + 1

Messagebox txAdmin, "Column " & col

End Forall

instead of

Messagebox txAdmin(0)