Create a hyperlink to show additional data in the Database
Results region
About
creating hyperlinks to show additional data
You can create hyperlinks that send field values or other
parameters from the Database Results region on one page to
another page containing a Database Results region.
A web page containing a Database Results region displaying a
list of employee names and phone numbers. Each employee name
is a hyperlink containing parameters that specify what
additional information to retrieve from the database.
When a site visitor clicks the employee name hyperlink, the
additional data from that record is shown on a new page.
To perform this task, complete the following procedures:
Step
1: Create the first (hyperlink) page
- In Page view, create or
open a page containing a Database Results region formatted
as a table or list.
You cannot create a hyperlink in a Database Results
region that is formatted as a drop-down list.
- Right-click the Database Results region, and then click
Database
Results Properties. The Database Results Wizard starts.
Click Next to get to Step 3.
- In Step 3 of the wizard, click
Edit List.
- In the Displayed
fields area, click to select the items in the list that
you don't want displayed on the web page.
- Click Remove, and then
click OK.
- Click Next until you reach
the last step of the wizard, and then click
Finish.
- Select the field you want to use for the hyperlink text,
and then click Insert
Hyperlink .
For example, to create an employee listing, choose the
field containing employees' last names.
- In the Insert
Hyperlink dialog box, type the URL or select the page
that will display the Database Results, click
Parameters, and then
click Add.
- In the Name box, type or
select the name of a unique field that contains the values
you want to pass as parameters. Usually this is the
primary key (primary key:
One or more fields (columns) whose value or values uniquely
identify each record in a table. A primary key cannot allow
Null values and must always have a unique index. A
primary key is used to relate a table to foreign keys in
other tables.).
The Value field will
populate with the appropriate value.
- Click OK until you return to
the web page.
Step
2: Create the second (display) page
- In Page view, create or
open a page containing a Database Results region formatted
as a table or list.
Make sure you use the same database connection and record
source as you did when you created the first (hyperlink)
page.
- Navigate to Step 3 of the Database Results Wizard, click
More Options, click
Criteria, and then click
Add.
- In the Field name
box, select the unique field that matches the hyperlink
parameter you selected on the initial results page (most
likely the
primary key).
For example, if you chose a field named
EmployeeID as the
hyperlink parameter on the initial results page, choose
EmployeeID here.
- In the Comparison
box, select equals.
- In the Value area, leave
the default value, which is the same as
Field name.
- Click the
Use this search form field check box.
Although you will not use a search form, selecting this
box allows the Database Results region to accept the
hyperlink value.
- Click OK to return to the
wizard, and click Next to get to Step 5.
- Click
Display all records together, and then click
Finish.
Note If you don't want to use the default search
feature that appears, drag the mouse pointer to select it,
and then press DELETE.