问题
I can't solve the problem with searching documents in lotus notes.
- I have a form
SearchForm
where placed a some fields (likedate_from
,date_to
,document_title
etc.) and button 'Run search'. - I have a view 'SearchView' where I want to display the search results.
When user enter the search criteria and click Run search
button I want to display the SearchView
with documents.
But I don't how to write click handler of button Run search
. Also I prefer to use Formula language to perform this operation.
Do any have a suggestion?
回答1:
I would suggest using the integrated search capacities. You seem to be coming from a non-notes background.
My suggestion: setup the database with full-text search
Create a 'Search View' containing all the documents you want to be able to search. (i.e. don't include Keywords, system documents, etc).
In this search view, you can include a button with the formula with the command
@Command([ViewShowSearchBar]; "1")
This will display the search bar in your view. If you click on the 'More' button (and the database is full-text-indexed) you'll see a number of options, including 'Form'.
If your form has got the checkbox 'Include in Search Builder', then it will get displayed in the list of forms used in the Search bar.
There are some limits to what this can do, but it's really fast to implement.
If you want to do something more complicated, then you will need to have a form that will show all the search options for the user. This form will then be used to calculate a search formula, and the search formula then used to search a collection of documents which you can then display in a private Folder.
But try first with the built-in methods. At the moment you're coming with a Browser/SQL pardigm, and that's not going to work in Notes.
来源:https://stackoverflow.com/questions/29747945/search-document-in-lotus-notes