David Remsen
Table of Contents
Web Databases


Creating a Record Detail Page.

1. Modify the Results page (results.htm)

Open results.htm. There are currently two or three fields that display database data. Click the first field (Gene) and delete it. We will replace it with a slightly different version. In the Filemaker Reference Library, return to the -Displaying results section. Scroll down on the right panel to locate the "Link to Record Detail" section and drag a blue-bordered field to the results page. Name this field "Gene" so it will display the Gene field from the database. This field is pre-composed to link to a file called "record_detail.htm"

A link from the results list to a single record in the database actually requires Filemaker to perform another search of the database. A search to retreive one specific article. Recall that the database server requires at least the following pieces of information to perform a search: database name, layout, and format file. We need to make sure these are supplied.

Click the link editor button. It shows the URL currently composed. Change it to read.

[FMP-LinkRecID: format=record_detail.htm, layout=single record]

Save the results page. It is now able to send the user to the record_detail page.

2. Create the file, record_detail.htm

Creating a detail page is a simplified version of the previous results page. Since we are only viewing a single record and not multiple records we do not have to use the FMP-Record set of start and end tags. All we need place and subsequently format are the fields we wish to view in a single record.

[FMP-FIELD: ] We will drag this FMP-field element to a new Claris Home Page file we will name record_detail.htm. We will add the following fields to this file

Create a new file and add these field elements. Separate them with carriage returns. Save the changes and then run a new search (find all genes beginning with 'g'). View the results set and then click on one of the gene names to view the record detail. Make sure you are able to do this before continuing.


Linking to Remote URL's

Examine the following URL

http://dbase.mbl.edu/genprotec/findgene.htf?G=argA

This is a database containing the gene products of E. coli, very similar to the sample database we are working on. Note that the last item after the equal sign is a Gene Name (argA). The name of the gene is built into the URL. This URL will perform a query of the database for that gene. Since our database also references these same gene names, if there was a way to substitute the Gene field from our database into this URL we could build automatic links to this database from our database.

If I were hand-composing HTML and I wanted to make the words, "Click here for argA" go to that URL, I would write

<A HREF=http://dbase.mbl.edu/genprotec/findgene.htf?G=argA>
Click here for ArgA

</A>

In other words it we could conceptually do the following...

From this: http://dbase.mbl.edu/genprotec/findgene.htf?G=argA

To this: http://dbase.mbl.edu/genprotec/findgene.htf?G =[GENE FIELD FROM MY DATABASE]

...we would give any gene in our database a link to this database. Of course, this is exactly what we can do! Here's how.

The icon representing the gene field in our database looks like this:
[FMP-FIELD: ]

The actual code for this icon (if you look behind the scenes) looks like this:

[FMP-FIELD: Gene]

If we place this field into our results page as [FMP-FIELD: Gene] it will display the gene name from our database.

If we place this field into our results page as [FMP-FIELD: SW] and make it a link using the link editor and type in the following URL

http://dbase.mbl.edu/genprotec/findgene.htf?G=[FMP-FIELD: =gene]

What do you think will happen? Hopefully, Filemaker Pro will substitute the gene name for each record in the detail page and build links to this database.

To do the same thing to PubMed or Entrez