![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi Gang, I am starting to learn about FM 7, and I am very excited at the progress I am making with my database. I am also quite new to database programming. While I understand the benefits of relating tables by a shared field, this does not quite work for me. I have a table with lots of fields and records. I want a second table to store a handful of fields in a single record. I will use this table to store things much like a preference storage source. For example wether a user wants to view data in metric units or in imperial units (this will determine which layout to open). Can I have a Preference table with a single record and then display the value of this record on a layout that is linked to the main table (which has many records)? If this can be done, please let me know how. Many thanks, Nandog |
#3
| |||
| |||
|
|
I have a table with lots of fields and records. I want a second table to store a handful of fields in a single record. I will use this table to store things much like a preference storage source. For example wether a user wants to view data in metric units or in imperial units (this will determine which layout to open). Can I have a Preference table with a single record and then display the value of this record on a layout that is linked to the main table (which has many records)? If this can be done, please let me know how. |
#4
| |||
| |||
|
|
Nando <not (AT) now (DOT) com> wrote: I have a table with lots of fields and records. I want a second table to store a handful of fields in a single record. I will use this table to store things much like a preference storage source. For example wether a user wants to view data in metric units or in imperial units (this will determine which layout to open). Can I have a Preference table with a single record and then display the value of this record on a layout that is linked to the main table (which has many records)? If this can be done, please let me know how. In FM 7, go to the Relationship graph, and put a Table Occurance for each table on the graph. The tables can be in the same file or in different files. If in a different file, you'll have to add a file reference to the second file before you have access to the tables in that file. Select a field in each table that always has data, such as a key field or other auto-filled field. Draw a line (click & drag) from the preference table to the data table. Then double-click on the small box on the relationship line. This will bring up the Relationship edit dialog box. In the middle, select the Operator pulldown, which will orignally show an "=" sign. Scroll down and select the "X" operator, which is called the Cartesian operator. (it may not be proper nomenclature, but bear with us) Now every record in the first table will be related to the single record in the preferences table. The "X" relationship also works to relate every record in a file to every record in another multi-record file. Just make sure the fields on both sides are always populated with SOME data, even if the data does not match. Lynn Allen |
![]() |
| Thread Tools | |
| Display Modes | |
| |