Manage Learn to apply best practices and optimize your operations.

Hide 'no documents found' on Web

Here's an easy way to hide or replace the "No Documents Found" text on Web views.

You Can View User Feedback To This Tip

Here's an easy way to hide or replace the "No Documents Found" text on Web views.

You can hide the text or replace it with your own text in the language of your choice.

Create a $$ViewTemplateDefault Form.
Create a Table (1:1) on this form.
Hide the Tbale border
Put in the table cell (should be one cell) the following.

<div id="msg">
Create here a $$ViewBody field
<div id="view">

the div statements should be passthrough ofcourse.

Then include this JavaScript in form in the JS Header:

var msg ='<VALIGN=TOP><br><br><FONT SIZE=2
FACE="Arial">Sorry, Nothing to
display</FONT><BR><BR><FONT SIZE=2
FACE="Arial">Thank you,</FONT><BR><FONT SIZE=2
FACE="Arial">Greetings, </FONT><B><I><FONT
SIZE=2 FACE="Arial">.............</FONT></I></B>'
function CheckNoDocuments() { // function to replace the 'No
documents found' message
if (document.getElementById("view").innerHTML.indexOf("No documents
found") > 0) {
document.getElementById("view").innerHTML = ""
document.getElementById("msg").innerHTML = msg
} // end if } // end function And in the onload event: CheckNoDocuments()
That's it - have fun!


  • Why not do this the easy/Notes way? Create a $$ViewTemplate. Put a "hide when" formula on the embedded view object (@IsError(@DbLookup("";"";"lookup view name";lookupvalue;1)) so that the view doesn't show if nothing is found. Add a text line below the embedded view object -- any message in any language you like -- with this "hide when" formula !@IsError(@DbLookup("";"";"lookup view name";lookupvalue;1)). —Michael P

Dig Deeper on Domino Resources - Part 6

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...