Perhaps the Following can help (found at http://lotus-blogs.blogspot.com/2009/01/interesting-and-undocumented-formulas.html):
flds = db.GetFields(False)
I think, that this will has the field index as return value. OK - that is not perfect (because you can decide, that the fields of a subform are not included to the field index), but I think that there cannot be a perfect solution which fits all needs.
Undocumented LotusScript
——————————————————————————–
Dim s As New NotesSession
Dim db As NotesDatabase
Set db = s.CurrentDatabase
If (db Is Nothing) Then
Exit Sub
End If
Dim flds As Variant, x As Integer, fldList As String
flds = db.GetFields(False)
For x = 0 To Ubound(flds)
fldList = fldList + flds(x) + Chr(13)
Next x
Msgbox fldList, 0, db.Title + " fields"