Function checkOnNonSpaceFields ( listFields As String , listFieldNames As String ) As Integer
Dim workspace As New NotesUIWorkspace
Dim doc As NotesDocument
Dim docUI As NotesUIDocument
Dim listFieldsV As Variant
Dim listFieldNamesV As Variant
Dim flag As Integer
Set docUI = workspace.CurrentDocument
Set doc = docUI.Document
listFieldsV = Explode ( listFields )
listFieldNamesV = Explode ( listFieldNames )
checkOnNonSpaceFields = False
If Ubound ( listFieldsV ) <> Ubound ( listFieldNamesV ) Then
Messagebox "Количество имен полей и их названий не совпадает" , 48 , "Ошибка"
Exit Function
End If
For i=0 To Ubound ( listFieldsV )
flag = True
If doc.HasItem ( listFieldsV ( i ) ) Then
flag = False
value = doc.GetItemValue ( listFieldsV ( i ) )
If Ubound ( value ) = 0 And Trim ( value ( 0 ) ) = "" Then flag = True
End If
If flag Then
Messagebox {Поле "} + listFieldNamesV ( i ) + {" должно быть заполнено.} , 48 , {Внимание}
On Error Resume Next
Call docUI.GotoField ( listFieldsV ( i ) )
Exit Function
End If
Next
checkOnNonSpaceFields = True
End Function