|
|
|
|
|
|
|
|
|
|
|
|
|
|
Adding Search functionality to Domino (continued)
Unlike the default search form, a custom search form searches the view specified in the [Search] button formula, not the view where the [Search] action was clicked.
In the above code, the "DiscussionSearchResults" view is the one that will be searched by default. This view's selection formula includes all Main Topic, Response and Response to Response documents. The view does not display documents in a response hierarchy, however. I use this type of view so that all documents will be displayed the same way, regardless of what type of document they are.
The second column in the "DiscussionSearchResults" view displays the value of the Form field. When a user searches the database on the keyword "Domino", the user will be able to tell which of the documents returned are Main Topics as opposed to Responses, as you can see in Figure G.
FIGURE G
 
Returns are labeled as Main Topics or Responses. Roll over picture for a larger image.
Modifying the custom search form to search the current view If you prefer that a search use the current view instead of a default search view, you'll need to make a few minor changes to the design elements you've created. First, change the [Search] shared action to use the following formula:
view := @URLEncode ( "Domino"; @Subset ( @ViewTitle; -1 ) );
@URLOpen ( "/" + @WebDbName + "/" + "$$Search" + "?OpenForm&view=" + view )
|
This formula opens the $$Search form via a URL, including the alias of the current view as a Query_String parameter. Since users will now initiate a search by opening a form instead of showing the search bar, you need to make several changes to the security settings of the application.
Modify the database ACL so that all Web users will have at least Author access to the database, with the ability to create documents. As a result, you may need to lock-down all of the forms in the database so that only authorized will be able to compose new documents with them.
You can achieve this by updating each form in the database so that the "Who can create documents with this form" property is set to one or more roles in the ACL. For the love of all you hold dear, please do not use Person or Group names! Additionally, the "Maximum Internet name and password" Advanced ACL setting needs to be increased to at least Author.
Next, add a new text field to the $$Search form called "SearchView". This field should be a computed field with the following formula:
@UrlQueryString ( "view" )
|
@UrlQueryString is a new @Function available in Notes/Domino 6. This function makes extracting parameters from the Query_String a snap.
Since the search results will be displayed using the current view and not a default search view, you'll want to add this additional keyword to the "Sort" field:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done.
Native to Lotus Domino. The User Experience unseen for Lotus Domino.
Do more with less. Really.
See the possibilities Docova unleashes for Lotus Domino. |
-- Advertisement --
Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.
Register by April 10 to save $200. |
|
|
|
|
|
|
|
|
|
|