Building the Search Results page
The Search Results page displays the records that are found or
matched according to the search request made in the Search page.
There are two ways of displaying records in a found set: as a list or
as a table.
Formatting results
The FMP-Record tag appears as an area that contains the fields for
the records in the search results page. In the browser, this record
area will repeat depending on the number of records found and the
maximum number of records displayed per page. For information on
setting the maximum number of records displayed per page, see
Setting options for the search
results.
To format search results as a list:
- Create a new blank page.
- Choose FileMaker
Form Library from the View menu (Windows) or the Window
menu (Macintosh).
- In the SEARCH section of the library,
select the entry for Displaying results under
the Search Results Page
section.
- Drag the FMP-Record tag into your Search Results page.
- Position the pointer so that it is within the FMP-Record area,
and then copy and paste a FMP-Field tag for every field you want
to appear in the area.
- Double-click each FMP-Field tag to display its object editor,
and then type the name of the field for each tag.
- Close the FMP-Field Tag Object Editor to apply your
settings.
- Add text to the area to create field labels, if necessary.
Tip In the browser,
the elements within the FMP-Record tag area (denoted by the box with
the red border) repeat as many times as there are records in a found
set. You can format the orientation of the elements in this tag, so
that multiple records appear vertically in the browser by typing a
carriage return character. Press Enter (or Shift-Enter for less white
space between lines) on Windows; or press Return (or Shift- Return
for less white space between lines) on Macintosh, immediately
following the last FMP-Field tag in the FMP-Record area.
To format search results as a table:
- Create a new blank page.
- Open the FileMaker Form Library.
- In the SEARCH section of the library,
select the entry for Displaying results under
the Search Results Page
section.
- Drag the table element from the library into the Search
Results page.
The table displays two columns, each with a field and field
label. The row in which the FMP-Field tags appear is identified by
a red border.
- Type over the Field_Label text to replace it with the name of
the field.
- To add more columns (to display fields), double-click the
table border to display the Table Object Editor.
- Click the Table tab, and type a number in
the Columns
text box, or click Add
Column.
- Copy and paste the FMP-Field tag so it appears in each
additional column and within the red border.
- Double-click each FMP-Field tag to display its object editor,
and then type the name of the field for each tag.
- Close the FMP-Field tag object editor to apply your
settings.
You can set up any table you create with Claris Home Page to
display results for your search. To do this:
- Double-click the table border to display the Table Object
Editor.
- Click the FileMaker tab, and then select
the Use as FileMaker
results table check box.
- Type a number for the row where the FileMaker record
information will end in the table in the End Repeating at row text
box.
The default is 1, but if you are using the first row to display
field labels (field names), type the number 2.
- Type a number for the row where the FileMaker record
information will begin in the table in the Start Repeating at row text
box.
The default is 1, but if you are using the first row to display
field labels (field names), type the number 2.
- Close the Table Object Editor to apply your settings.
For search results formatted as lists or tables, the maximum
number of records displayed per page will vary based on options you
set in the Search page. See Setting
options for the search results for more information.
Building navigational links and text
Your Search Results page can contain tags for navigating to the
next and previous pages of records in a found set as well as links to
the Record Detail page, which shows one record per page. You can also
include tags that provide information about the FileMaker Pro found
set.
To add navigational links to the previous and next range of
records in a found set:
- Open the FileMaker Form Library.
- In the SEARCH section of the library,
select the entry for Navigating under the Search Results Page
section.
- Drag the FMP-LinkPrevious and FMP-LinkNext tags into your
Search Results page.
- Place the insertion point so that it is within the
FMP-LinkNext and FMP-Previous areas, and then type the text for
the links.
To make the field data that is returned in the Search Results page
into a link to the Record Details page for the record displayed:
- Open the FileMaker Form Library.
- In the SEARCH section of the library,
select the entry for Navigating under the Search Results Page
section.
- Drag the special FMP-Field tag in the Link to Record Detail
section of the Displaying results library entry
into the FMP-Record area.
The special FMP-Field tag is denoted by a blue border in Edit Page
mode to indicate that it is a link.
If you are using a table to format the search results, drag the
special FMP-Field tag into the appropriate table cell (any cell in
a row or rows denoted by the red border).
- Double-click the special FMP-Field tag to display its object
editor, and then, in the Field Name text box, type the
name of the field that will be the link to the Record Detail
page.
- Close the special FMP-Field Object Editor to apply your
setting.
- With the FMP-Field tag selected, choose Link Editor from the View menu
(Windows) or choose Show
Link Editor from the Window menu (Macintosh).
- In the Link Editor, type the name of your record detail page
in place of "record_detail.htm." In place of "layout name here,"
type the name of the layout used by the page you are linking
to.
- Close the Link Editor to apply your setting.
Including search information and statistics
You can include search information and database statistics in the
Search Results page. Including search information is useful when
testing the pages or to provide information to your Web audience.
Tags for indicating the current action (find), current database,
current layout, current format, and current maximum records per page
are examples of information you can provide.
To add search information and statistics to the Search Results
page:
- Open the FileMaker Form Library.
- In the SEARCH section of the library,
select the entry for Search information or Statistics under the
Search Results Page
section.
- Drag the tags you want to include in the Search Results page
(for example, drag FMP-CurrentMax).
- Type the text you want next to the FMP-CurrentMax icon.
Saving the Search Results page
When you save the Search Results page, the name should correspond
to the filename used in all files that refer to it. In the case of
the Search Results page, its filename is specified in the -Format tag
of the Search page. For example, the Search page named "search.htm"
might refer to the Search Results page called "search_results.htm."
See Building the Search page for
more information.
Previous topic |
Contents | Next
topic