Home > Products > UltraDev > Support > Building Common Applications
Dreamweaver UltraDev Icon Macromedia Dreamweaver UltraDev Support Center - Building Common Applications
Showing a "no records found" message

Hiding page elements when no records are found may still confuse some users. For instance, the modifications made to the example page (so far) produce the following page when no records are returned:

Faced with such a page, a user may wonder if there was an error or if the search feature is running at all. The solution is to apply a Show Region server behavior to a message alerting the user that no records were found. If records are found, the server behavior hides the message; if records are not found, the server behavior shows the message. This section describes how to create such a message.

To create a "no records found" message:

1 Open the results page in UltraDev's Document window.
The example page used in this article, including the modifications made to it so far, looks as follows with Live Data turned off:
Note: The gray "Show If" outlines are not visible with Live Data turned on.
2 Compose and format the message alerting the user that no records were found.
In the example page, a one-cell table was used to position the message on the page as follows:

3 Select the message.
In the example page, the one-cell table containing the message was selected.
4 Apply a Show Region server behavior to the message by clicking the plus (+) button in the Server Behavior panel and choosing Show Region > Show Region If Recordset Is Empty, as follows.


In contrast to the display elements you hid earlier, you want to show the message when the recordset returned by the search has no records.
5 Specify the recordset to check for records, then click OK.
In the Document window, a thin, tabbed gray outline appears around the message.
When you run the page in a browser and no records are found, the Show Region server behavior shows the message while the other Show Region server behaviors hide the record-display elements.
To Table of Contents Back to Previous document