Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Search response document

Posted on 2007-10-10
8
Medium Priority
?
216 Views
Last Modified: 2013-12-18
Experts,
    I have this search function below.... Can I add another FIELD FORM to search from? I also need to get the data from the response document of FORM="MainReport".
    If F1$ <> "" Then
       searchString = |FIELD FORM = "MainReport"  | & F1$    
       Call CheckIndex
       Set db = session.CurrentDatabase      
       Call ClearFolderContent
       Set view = db.GetView( "CustomSearch" )
      vwCount = view.FTSearch(searchString, 0)      
      Set vc = view.AllEntries      
      Call vc.PutAllInFolder( "SEARCHFEECOMP" )
      Call ws.ViewRefresh
   End If
0
Comment
Question by:aentice
7 Comments
 
LVL 22

Accepted Solution

by:
Bill-Hanson earned 672 total points
ID: 20051127
Yes, just use the OR operator...

   If F1$ <> "" Then
       searchString = |(FIELD FORM = "MainReport" OR FIELD FORM = "MainReportResponse")  | & F1$    
       Call CheckIndex
       Set db = session.CurrentDatabase      
       Call ClearFolderContent
       Set view = db.GetView( "CustomSearch" )
      vwCount = view.FTSearch(searchString, 0)      
      Set vc = view.AllEntries      
      Call vc.PutAllInFolder( "SEARCHFEECOMP" )
      Call ws.ViewRefresh
   End If
0
 

Author Comment

by:aentice
ID: 20051961
The search result does not display response on the folder SEARCHFEECOMP. I had the remark field added in a column in both CustomSearch and SEARCHFEECOMP. Also, I added in View Selection the additional FORM = MainReportResponse
0
 
LVL 31

Assisted Solution

by:qwaletee
qwaletee earned 664 total points
ID: 20052498
Why don't you make sure it is doing what you expect it to.  Add prompts so you can see what it searched against, and how many results were resturned.  You can then manually ocnduct the same search, and see if it is a problem in the search logic or something else.

In addition, the NotesView.FTSearch method changes the domain of the GetFIrstDocument/GetNextDocument/GetNthDocument methods.  I don't believe it affects the domain of the NotesViewEntryCollection that you are using, for which you have to use NotesViewEntryCollection.FTSearch.

Do the following to make both changes suggested above.  Change the script to

  If F1$ <> "" Then
       searchString = |(FIELD FORM = "MainReport" OR FIELD FORM = "MainReportResponse")  | & F1$    
       Call CheckIndex
       Set db = session.CurrentDatabase      
       Call ClearFolderContent
       Set view = db.GetView( "CustomSearch" )
      Set vc = view.AllEntries      
baseCount = vc.count
      Call vc.FTSearch(searchString, 0)
msgbox "Search for " & searchString " & " found " & vc.Count & " entries (without search had been " & baseCount & " entries)",,searchString
      Call vc.PutAllInFolder( "SEARCHFEECOMP" )
      Call ws.ViewRefresh
   Else
       msgbox "No search performed"
   End If

Now, see if this gives you the result you want.  If it does not, copy the msgbox search string into the search bar and run the search manually.  See if it returns what you expect.  If not, fix the search or the view.  If the results are correct, then manually drag that into an empty SEARCHFEECOMP folder, see if it matches your expectation.  if not, fix the folder.

One final note.  FTSearch is documented as affecting the GetXXXX methods.  I have never tried it with PutAllInFolder.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 46

Assisted Solution

by:Sjef Bosman
Sjef Bosman earned 664 total points
ID: 20055686
Just a remark: did you deselect the "Show responses in hierarchy" option in the folder?
0
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 20056458
Are you sure that the responses are not in the folder?  Have you tried "Expand All" to ensure that they are not collapsed under the main documents?

Also, what do you have for the rest of your search string (F1$)?
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 20198998
Ping...
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20433910
Forced accept.

Computer101
EE Admin
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses
Course of the Month13 days, 1 hour left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question