Does anyone know where I can got to get some pointers on making a Lotusscript search form for my database?
I know that I need a text editable field to type in then a button with lotusscript to search.
I want to be able to search all the views in my database with this.
Thanks!
Subject: Lotussript search form
Dear Loyd
Building a search form and results is a little tricky than web. Here is how to proceed.,
-
Build a search form with required fields and search button
-
have search button gather info from fields in a string array
Dim SearchKeys(1 To 4) As String
…
SearchKeys(1)=Document.txtOrderNoToSearch(0)
SearchKeys(2)=Document.txtLastNameToSearch(0)
…
Set SearchDocument = SearchView.GetDocumentByKey(SearchKeys,False)
…
if Not(SearchDocument is Nothing) Then
Set uiDocument = uiWorkspace.EditDocument(False,SearchDocument)
…
This will open the result document in edit mode
If your search results multiple documents, create a folder and populate the folder with search results
Set SearchDocumentCollection = SearchView.GetAllDocumentByKey(SearchKeys,False)
…
[…loop document collection and put each document in folder]
Note: You want to use a folder and not a view, because folder has no documents until you put one. This way user sees nothing until the search is complete.
Hope that helps.
Viral Patel
Subject: RE: Lotussript search form
Thanks to both of you. I’ll try this! :O)
Subject: Lotussript search form
The article includes an attached example file. It’s designed for the web, but it should still help get you started.
http://www.codestore.net/store.nsf/unid/HUMR-68URJD?OpenDocument