Anonymous
Domino 2.0 Rich Internet Applications with IBM Lotus Notes/Domino
You are here: Today » Create an HTML table with all the fields in a document
« Analog clock in JavaScript
Caching document info in a field »

Create an HTML table with all the fields in a document

A short LotusScript function to list all the field names and values in a document. The function makes use of my StringBuffer Class to collect the text fragments. The output is an HTML table.

Function getAllFields(doc As NotesDocument)As String
    Dim out As New StringBuffer(100)
    
    out.add |<h2>Test fields</h2>|
    out.add |<table>|
    Forall item In doc.Items
        out.add |<tr><td>| & item.Name & |</td><td>| & doc.GetFirstItem(item.Name).Text & |</td></tr>|
    End Forall
    out.add |</table>|
    
    getAllFields=out.collapse(NEWLINE)
End Function

Star rating

80%

Comments

To add a comment, log in or register as new user. It's free and safe.