To continue reading for free, register below or login
To read more you must become a member of SearchDomino.com
');
// -->

You can use the "Fields" property of the NotesForm class in LotusScript to get a list of all Lotus Notes fields on a given form design element. The LotusScript code below was adapted from an example in the Domino Designer Help database:
Set db = session.CurrentDatabase
Set form = db.GetForm("FORM_NAME")
fieldCount = 0
msgString = ""
Forall field In form.Fields
fieldCount = fieldCount + 1
msgString = msgString &
Chr(10) & " " & field
End Forall
Messagebox form.Name &
" has " & fieldCount & " field(s):" &
Chr(10) & MsgString
If you were really looking to get all of the fields on a specific Lotus Notes document, you could use the "Items" property of the NotesDocument class.
Dim ws As New NotesUIWorkspace
Dim doc As NotesDocument
Dim strFields As String
Set doc = ws.CurrentDocument.Document
Forall i In doc.Items
strFields = strFields & Chr(10) & i.Name & " = " & i.Text
End Forall
Msgbox "Field Values: " & Chr(10) & strFields
Do you have comments on this Ask the Expert Q&A? Let us know.
Related information from SearchDomino.com:
Tip: How to import data from Excel to a Lotus Notes form with LotusScript
Expert Advice: Importing data from Microsoft Excel to a Lotus Notes form
Tip: Create a computed Lotus Notes field to list Personal Address Book names
Reference Center: Lotus Domino Designer
Reference Center: LotusScript
|