FTSearch to select a doc from DB1. However, when I setup Doc a in DB 1 and
then try searching from DB 2, it's not found. Why?
This is due to the way full text indexes are updated. The help text says that
"immediate" updates are performed "As quickly as possible after the database is
If, for example, you have both databases open at the same time and try the
search,the doc can't be found because DB 1 has not had it's FT index updated.
To solve this, put the following code as a "Save and Exit" button for the form
in DB 1.
The coding examples will force your users to use a button to save & exit, which
will also update the Full Text Search (see last line)
1. In your form for DB 1, Create a Text, hidden, Editable field, default value
"0" called Allowsave with the following code for Input Validation:
@If(AllowSave = "0"; @Failure("To validate and save this document, use the
\'Save and Exit\' Button!"); @Success);@Success)
2. Create a button with the following Script in the Click event:
Sub Click(Source As Button)
'Set up Session & Current Document
Dim session As New Notessession
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = ws.CurrentDocument
'Set up the Current Database in this session
Dim db As notesdatabase
'Update the field to allow save of doc.
'Save the Doc
'Close the Doc
'Update the Index
Call db.UpdateFTIndex( False )