Is there a way to read 3 rows in a view and then condense the contents into 1 row with a number of columns? I’d like to report on our names.nsf file in a 1 page condensed printable document.
For example, a view looks something like this:
Name, Phone
Bob, 123-3434
Shawn, 123-5666
Dave, 343-7777
Mike,123-1111
Bill,123-2222
Sue,123-3333
Turn it into a table that looks like this:
Name, Phone, Name, Phone, Name, Phone
Bob,123-3434,Shawn,123-5666,Dave,343-7777
Mike,123-1111,Bill,123-2222,Sue,123-3333
Subject: script
Put this in an agent (on selected document).You could also adjust it to get the columns values…
Sub Initialize
Dim nws As New NotesUIWorkspace
Dim nss As New NotesSession
Dim ndc As NotesDocumentCollection
Dim doc As NotesDocument
Dim inC As Integer, fileNum As Integer
Dim stNew as string, stSep as string, stAll As String, fileName As String
fileNum% = Freefile()
fileName$ = Environ("TEMP")+"\adr.csv"
Open fileName$ For Output As fileNum%
Set ndb = nss.currentdatabase
Set ndc = ndb.UnprocessedDocuments
Set doc = ndc.GetFirstDocument
inC = 1
stNew = ", "
stSep = ", "
Do Until doc Is Nothing
If inC = 1 Then
stAll = doc.FullName(0) + stSep + doc.OfficePhoneNumber(0)
Elseif inC = 3 Then
stAll = stAll + stNew + doc.FullName(0) + stSep + doc.OfficePhoneNumber(0)
Write #fileNum%, stAll
stAll = ""
inC = 0
Else
stAll = stAll + ", " + doc.FullName(0) + stSep + doc.OfficePhoneNumber(0)
End If
inC = inC + 1
Set doc = ndc.GetNextDocument(doc)
Loop
Close fileNum%
vRun = Shell( "notepad.exe " +{"} + fileName$ +{"},1)
End Sub
Subject: Table?
Any way to do this export to a table on the web?