当前位置: 代码迷 >> Lotus >> lotusscript得到视图一列的和应该如何写
  详细解决方案

lotusscript得到视图一列的和应该如何写

热度:160   发布时间:2016-05-05 07:15:23.0
lotusscript得到视图一列的和应该怎么写啊
Dim s As New notesSession  
Dim db As notesdatabase  
Dim view As notesView  
Dim doc As notesDocument  
Dim userName As Variant
userName =Evaluate("@Name([CN];@UserName)")
Dim counter As Integer  
Set db=s.CurrentDatabase 
Set view=db.GetView("stuffview")  
Dim dc As NotesDocumentCollection
Msgbox "sssssssss "+userName(0)
Set dc = view.GetAllDocumentsByKey(userName(0)) 



Set dc = view.GetAllDocumentsByKey(userName(0))  
我要把这个作为循环的结束 


------解决方案--------------------
看看这个例子
This agent displays the values of all the columns for a view entry.
Sub Initialize
Dim session As New NotesSession
Dim db As New NotesDatabase("","test.nsf")
Dim view As NotesView
Dim entry As NotesViewEntry
Set db = session.CurrentDatabase
Set view = db.GetView("All")
Set entry = view.GetEntryByKey("Sports car", False)
Forall colval In entry.ColumnValues
col% = col% + 1
Messagebox colval,, "Column " & col%
End Forall
End Sub