troubleshooting Question

Search Form

Avatar of varvoura
varvoura asked on
Lotus IBM
6 Comments1 Solution216 ViewsLast Modified:
Hi all,

I have created a search form to perform a full text search in my notes database. the form has a button called "Search" which uses the newsletter object to perform the search.
This is all working very well, however, as this does an entire database search it returns searches from a couple of form which i want excludes out of the search as they are only lookup/profile forms.
Is this possible.

Below is the code behind the search button, is anyone able to review and advise of possiblity of the above?

Dim ws As New notesuiworkspace
      Dim uidoc As notesuidocument
      Dim session As New NotesSession
      Dim db As NotesDatabase
      Dim dc As NotesDocumentCollection
      Dim news As NotesNewsletter
      Dim doc As NotesDocument
      Set db = session.CurrentDatabase
      Set uidoc = ws.currentdocument
      Set doc = uidoc.document
      searchFormula$ = doc.BasicSearch(0)
      If searchFormula$ = "" Then
            Exit Sub
      End If
REM searchFormula$ = """" & searchFormula$ & """"
REM Call db.UpdateFTIndex(True)
      Set dc = db.FTSearch(searchFormula$, 100)
      Set news = New NotesNewsletter(dc)
      news.DoScore = False
      news.DoSubject = True
      news.SubjectItemName = "NewsSubject"
      Set doc = news.FormatMsgWithDoclinks(db)
      doc.subject = "Search Results For:  " & searchFormula$
      doc.form = "Search"
      doc.SaveOptions = "0"
      Set uidoc = ws.EditDocument(True, doc)
end sub

Where "NewSubject" is the field on each of the forms which has what I want returned on the search result form.

Also, for some reason, when I do the search(by clicking the search button on the search form form) I get all the results that I need, then I click one of the links on the result search screen(search form which has only a subject and a body field), it opens the correct document, when I close that document, I seem to go back to the search screen(search form) instead of the search result screen(search form). Actually to be more precise, when I click on the link to open one of the results document, I seem to lose the result screen from the workspace window tabs and the only one that's remain is the search form with the opened document.

Hope someone has an idea on what could be going wrong with this.

Thank you in advance.


Sjef Bosman
Groupware Consultant

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros