We help IT Professionals succeed at work.

Override the message after making a search in a view

giusepe asked
I have been implementing a search bar in one of the Domino web applications that i have in production, but when people make a search and there are no documents found in the database, the server renders the message "No Documents Found". How can i trap the result from the server or override the result from the server to customize the result and apply another message for the users.
Ex: "Sorry, try another keywords to find the documents "

Related with this is the situation where i make i search and the server finds 5 documents, i would like to override the message again and apply another message when i get the 5 documents.
Ex: "There are 5 documnts that match your criteria....."

How can i accomplish this ???

Watch Question

You can customize your search result form using $$SearchTemplateDefault form. To display customized message, you can try this...

> Create a hidden computed for display field called "Hits" and give field value as Hits (this is a reserved field).
> Create one more computed for display field and name it "DisplayResult".
> In the "DisplayResult" field value, give this formula
@If(Hits=0;"Sorry, try another keywords to find the documents";"There are "+@Text(Hits)+" documents that match your criteria.")

Hope this will help you...

Good luck.
- Sankar


Thanks a lot Sankar, your tip has been of much help for me .

Explore More ContentExplore courses, solutions, and other research materials related to this topic.