|
|
Iron Speed Designer displays the foreign key relationships associated with the selected table or query so they can be easily added to your selection criteria. |
If this option is selected, the field is assumed to contain foreign key values that link to another table. You can fetch and display data from the foreign table and display it instead of the foreign key value itself.
You can further choose to “hop” one level to the next record connected by the original record. For example, if you have an Order record containing a Customer ID, you can display the Customer’s Last Name by selecting the Foreign Key relationship of “Orders to Customers”. This is only applicable from a parent to a child, not from a child to a parent.
|
<GEN:Record Name=”Orders”> <td><GEN:FieldValue Name="ID"/></td> <td><GEN:FieldValue Name="Customer"/></td> <td><GEN:FieldValue Name="Date"/></td> <td><GEN:FieldValue Name="Amount"/></td> </GEN:Record> |
Even though the parent tag is bound to the one table, you can display data from other tables via foreign key references. |
|
|
In this example, the parent tag is bound to the Orders table. The page displays FieldValue tags bound to the Customers table by using the foreign key relationship between Orders.Customer and the Customers table. |
The parent tag specifies the table containing the foreign key value. Only those foreign key relationships known to Iron Speed Designer are shown (Iron Speed Designer can’t read your mind). Foreign key relationships can be:
Explicit. Explicit foreign key relationships are defined in the database itself. Iron Speed Designer automatically detects these foreign key relationships and uses them when generating your application. Developers or DBA’s typically enforce foreign key constraints within the database.
Implicit (virtual). Implicit foreign key relationships are not defined in the database. Instead, you identify these implicit foreign key relationships to Iron Speed Designer via the Virtual Foreign Key facility on the Database tab. (For more details on adding virtual foreign key relationships to your application, see “Adding Virtual Foreign Key Relationships”.)
If you select a foreign key relationship, then Iron Speed Designer generates an additional Record control inside the first Record control. The inner Record control specifies the relationship between the two Record controls.