Here's a quick way to populate a number field on a Lotus Notes UI document with a processed list using LotusScript. Just create a number field with "allow multiple values" and "computed when composed" selected. Then, simply make a button with the following LotusScript code:
Sub Click(Source As Button)
Dim w As New notesUIWorkspace
Dim uidoc As notesUIDocument
Dim doc As notesDocument
Set uidoc = w.currentDocument
Set doc = uidoc.document
Dim idlist As Variant
idlist = Evaluate(|@DbColumn
("Notes":"NoCache";"";"yourview";1)|, doc)
Dim a() As Integer
Redim a(0)
Forall v In idlist
a(Ubound(a)) = v
Redim Preserve a(Ubound(a)+1)
End Forall
Redim Preserve a(Ubound(a)-1)
doc.yournumberfield = a
Call doc.Save( True, True )
End Sub
Do you have comments on this tip? Let us know.
This tip was submitted to the SearchDomino.com tip library by member Jerry Fogle. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.