I am trying to search multiple database… through a view in a particular database… all the databases are on different server… i am aware of coding techinique Ftsearch to search a particular database…also using Selectformula…can anybody help me with code…as to how to select different database… n search documents depending upon a particular keyword…provided through an inputbox…
Subject: RE: Search Multiple Database on different servers… using a keyword…through
dear it can work only if m having admin role…but i want something…which can help all the users…to search multiple database… can anybody help me with code…pls it is a bit urgent…thanks a lot
Dear All,I have Coded an agent…will prompts for search key…and on entering the key it calculates…total no of documents for that key…in specified database…now i want your help to display those data in my current database view…
the following is my code…
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim ui As NotesUIDocument
Dim uiview As NotesUIView
Dim view As NotesView
Dim dtDate As NotesDateTime
Dim dbdir As New NotesDbDirectory("")
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Set db = dbdir.GetFirstDatabase(DATABASE)
’ dbTitle = Inputbox(“Title of database?”)
'While Not(db Is Nothing)
'If db.Title = dbTitle Then
Call db.Open("RIPL1", "ProfileDatabase.nsf")
'Set db = dir.OpenDatabase("Web test")
Set v = db.GetView("Search new All / ORDER ID")
Set doc = v.GetFirstDocument
searchText = ws.Prompt(PROMPT_OKCANCELEDIT,"Enter Search Code","Enter Search String")
Set uiview = ws.CurrentView
Set view = uiview.View
sformula = "Select ((@Contains(@Uppercase(RFPID) ; @uppercase(""" + searchText + """))))"
v.SelectionFormula= sformula
'Set dc = db.AllDocuments
'Set doc = dc.GetFirstDocument()
’ While Not(doc Is Nothing)
'Messagebox "Subject: " & doc.Subject(0)
'sformula = "Select ((Form = ""Requisition"") | @IsResponseDoc )"
'sformula = sformula & "two := @Date(" + year1 + ";"+ month1 + ";" + Day1 + ");"
'sformula = sformula + "SELECT ( form = ""Memo"" )"
'Set uiview = ws.CurrentView
'Set view = uiview.View
'v.SelectionFormula= sformula
Call ws.ViewRebuild
ct = v.EntryCount
Msgbox "The number of docs are " + Cstr(ct)
sformula = "Select ((Form = ""Requisition"") | @IsResponseDoc )"
' This is to reset the condition after the execution with the current
'serach criteria for the next search
view.SelectionFormula= sformula
view.Refresh
'Set doc = V.GetNextDocument(doc)
'Wend
Exit Sub
'End If
Set db = dbdir.GetNextDatabase
I doubt changing a view is the best way to go - what happens when 2 users search on different strings? If you want to do it that way, use Private Views or Folders/PutInFolder etc
Maybe you could use your searchformula to create a doccollection and put that in a newsletter
I think you’re asking too much for a quick answer, but maybe someone will be able to help