IBM®
Skip to main content
    Country/region select      Terms of use
 
 
   
     Home      Products      Services & solutions      Support & downloads      My account     
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Technical Library
developerWorks



Tips from LDD

Replacing the No documents found message

Tip submitted by
Dimple Rao


Level: Intermediate
Works with: Notes and Domino
Updated: 12/02/2002

Related link:
More Tips from LDD


Typically, when you search a view for documents and no documents are found, you receive the message No documents found. If you find this message unfriendly or unhelpful, you can replace the message with a customized one, such as Sorry, no documents found in this view. This tip works on the Web, but not in the Notes client, and requires that you use a view template to display a view.
  1. In Domino Designer, open the view template you want to customize.
  2. In the template, add a hidden Computed-for-display field named hasDocs. Include the following code as the field's formula.

    result:=@dbcolumn("":"nocache";"";<viewname>;<column no>);
    @if(@iserror(result)|@elements(result)=0;"0";"1")


    Replace the <viewname> with the name of the view that the template applies to and replace <column no> with a column number or "".
  3. Add <span> tags to the template around either the embedded view or the $$ViewBody field to the template:

    <span style="display:<computed value>">the embedded view or $$ViewBody field</span>
  4. Right-click the <span> tag, and then select Text Properties from the menu to open the properties box.
  5. Select the Paragraph Hide When tab, then add the following formula:

    @if(hasDocs="0";"none";"default")

    Text Properties - Hide Paragraph When formula
  6. Add a second set of <span> tags with the custom message that you want to have appear in place of the No documents found message as follows:

    <span style="display:<computed value>">custom message</span>

    The following screen shows an example of a view template with a custom message.

    <SPAN> tags in view template example
  7. Open the Text Properties box, select the Paragraph Hide When tab, and then add the following formula:

    @if(hasDocs="0";"default";"none")
  8. Save and close the view template.

The next time your you search the view, if no documents are found, the message that appears is your custom message.

SUBMIT YOUR TIPS!
We encourage you to send us your tips (You can also click the "Would you like to submit a tip?" graphic below.) Your tips can be anything you've discovered about any Lotus product. The most important thing is that your tip be interesting, useful, or handy. And be sure to include complete information about how your tip works. For ideas, take a look at our tip archives. If we publish your tip, we'll send you the IBM Redbooks Lotus Collection on CD.






Would you like to submit a tip?
    About IBM Privacy Contact