Public Sub InputSearchDialog
Dim ws As New NotesUIWorkspace
Dim dialog As NotesDocument
Set dialog = ws.Currentdatabase.Database.CreateDocument
If Not ws.DialogBox ("Dialog\Search", True, True, False, False, False, False, "", dialog, True) Then
Exit Sub
End If
Dim view As String
Dim regnum As String
Dim status As String
Dim createdate As String
Dim regdate As String
Dim execdate As String
Dim formula As String
Dim arr(1 To 3) As String
arr(1) = dialog.Getitemvalue("DocView")(0)
arr(2) = dialog.Getitemvalue("DocRegNum")(0)
arr(3) = dialog.Getitemvalue("DocStatus")(0)
Dim v(1 To 3) As String
v(1) = "Title"
v(2) = "DocRegNumber"
v(3) = "DocStatus"
Dim i As Integer
For i = 1 To 3
If arr(i) <> "" Then
If formula = "" Then
formula = "{" & v(i) & {="} & arr(i) & {"}
Else
formula = formula & " " & v(i) & {="} & arr(i) & {"}
End If
End If
Next i
If formula = "" Then
MsgBox "Пустой запрос"
Exit Sub
End If
formula = formula & "}"
'formula = FullTrim(formula)
MsgBox formula
Dim col As NotesDocumentCollection
'formula = {Title= "Входящий документ"}
Set col = ws.Currentdatabase.Database.Search(formula, Nothing,0)
MsgBox col.count
'Call doc.save(True, True)
End Sub