当前位置: 代码迷 >> Lotus >> CS 模式下有什么可能把表单中的所有域输出来吗解决思路
  详细解决方案

CS 模式下有什么可能把表单中的所有域输出来吗解决思路

热度:351   发布时间:2016-05-05 07:21:05.0
CS 模式下有什么可能把表单中的所有域输出来吗
得到表单中的所有域名/把表单中的所有域名输出,有什么办法吗。我知道BS中有类似的方法,CS中有什么办法吗?

------解决方案--------------------
看看帮助就知道了

NotesForm对象的Fields属性

Example
Read-only. The names of all the fields of a form.
Defined in
NotesForm
Data type
Array of strings
Syntax
To get: stringArray = notesForm.Fields
Usage
If the form contains no fields, the Fields array has one element whose value is an empty string.
Any fields of type "Computed for display" will not be included in the Fields array. If all of the fields on a form are of type "Computed for display", the Fields array has one element whose value is an empty string.


Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
formNameIn = Lcase(Inputbox("Name of form?"))
Forall form In db.Forms
If Lcase(form.Name) = formNameIn Then
If Isempty(form.Fields) Then
Messagebox form.Name & " has no fields"
Else
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
End If
Exit Sub
End If
End Forall
Messagebox "The form """ & formNameIn & """ does not exist"
  相关解决方案