Formatting a Notes view in HTML table for WEB

If you need to view documents in more then one column, you can use this WebQueryOpen agent in your
$$ViewTemplate. You need only a field for the column number and a view with
@DocumentUniversalID in first column.
Sub Initialize
'main is the name of the field 
'tutti is the name of the view
     Dim s As New notessession
     Dim doc As notesdocument , newdoc As notesdocument
     Dim db As notesdatabase 
     Set doc = s.DocumentContext
     Set db = doc.parentdatabase
     nCols = doc.Colonne (0)
     Dim eledoc As String
     eledoc = | @DbColumn ( "Notes":"NoCache"; @DbName; "tutti"; 2 ) |
     eval = Evaluate( eledoc, doc)
     main = main + |<br>Presenti | + Cstr ( Ubound ( eval ) + 1 ) + | 
documenti nella vista<br><br>| main = main + |<table border="1"><tr>| For i = Lbound ( eval ) To Ubound ( eval ) Set newdoc = db.GetDocumentByUNID( eval(i) ) form = newdoc.form (0) main = main + |<td><a href=/bolis.nsf/tutti/|"/bolis.nsf/tutti/| + eval (i) +
|?openDocument">| + Cstr ( form ) + |</a></td>| If (i+1) Mod nCols = 0 Then main = main + |</tr><tr>| End If Next main = main + |</tr></table><br><br>| doc.Main = "[" + main + "]" End Sub

This was first published in May 2001

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.