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

Dig deeper on Domino Resources - Part 7

0 comments

Oldest 

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:

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close