Nested Repeat Region Wizard

The Nested Repeat Region Wizard can display records from two related tables (master and detail tables) in an organized manner. The wizard uses the foreign key A foreign key is a field from a database table that refers to (or targets) a specific key, usually the primary key, in another table. This is a convenient way of logically linking information from related tables in the same database. For instance, a table that stores information about products can contain a foreign key that references the primary key field in a table that stores manufacturers. This way, each product has an associated manufacturer – its associated foreign key points to the unique identifier of the manufacturer. Please note that the foreign key is not unique, but the referenced field (the primary key in the referenced table) usually is. to determine which detail record A database row from the detail table. The detail table is defined by a many-to-one relation to another table (the master table) belongs to which master record A database row from the master table. The master table is defined by a one-to-many relation to another table (the detail table), and lists them accordingly.

It will add all the required elements into the page, like tables, recordsets and server behaviors. You can also create these elements by hand, and then use the Nested Repeat Region server behavior to achieve the same result.

The Nested Repeat Region Wizard is accessible from two locations:

This wizard has two steps. Instructions about the correct configuration are given below.

 

To set the dialog box options for the first step of the wizard, read the instructions below:

  1. In the Connection drop-down menu select the database A database refers to data organized and stored on a computer that can be searched and retrieved by a computer program. Most industrial-strength and many smaller database applications can be addressed using SQL (Structured Query Language). connection defined for your site; if you don't have a connection yet, you can use the Define button and create one now.
  2. In the Master table drop-down menu select the table containing the master records. This drop-down menu displays all the tables retrieved from the connection you selected at the first step.
  3. In the Primary key drop-down menu you must select which field contains the primary key in the master table. It automatically selects the first field.
  4. In the Display Value drop-down menu select the field that stores the names you want to be displayed.
  5. In the Detail table drop-down menu select the table that contains the records linked to the ones in the master table.
  6. In the Foreign key drop-down menu select the detail table field which contains the relation In a database, tables are usually linked together in a logical way. A link between two tables is called a "relation". A relation always involves two tables ad two columns from them (one can create a relation between a table and itself for representing a tree like structure) to the master table.
  7. The Display value drop-down menu allows the choosing of a suitable field for display instead of the foreign key.
  8. The five buttons in the lower part of the interface offer the following functionalities:
    ·  With the < Back / Next > buttons you can navigate through the wizard's steps.
    ·  Click Finish when you are done configuring the wizard.
    ·  Click Cancel to exit without the new settings to be applied.
    ·  The Help button brings you to this help page.
    These buttons appear on all three interfaces of the Nested Repeat Region Wizard.
  9. Click Next to continue with configuring the wizard.
 

 

To set the dialog box options for the second step of the wizard, read the instructions below:

  1. In the Repeat style radio group select the method by which the detail records will be displayed: List (comma-separated list) or Sub-table (tree-like structure).

  2. The image below this radio group gives a preview of how the list will look like. In the image above, you can see the sub-title style, and in the next image, the list style:


     

  3. Click Finish when you are done configuring the wizard.

In the Dreamweaver page, the result should look something like this:

 

Note: If two nested repeat regions are used on the same page, you must create a separate recordset for each one. If you try to use the same recordset for both you will be prompted with an error message.

Related Topics