dbTalk Databases Forums  

Newbie question- displying fields from a second table

comp.databases.filemaker comp.databases.filemaker


Discuss Newbie question- displying fields from a second table in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nando
 
Posts: n/a

Default Newbie question- displying fields from a second table - 08-11-2005 , 10:38 PM






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

Reply With Quote
  #2  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: Newbie question- displying fields from a second table - 08-11-2005 , 11:43 PM






Yes, that's the best way to store data that you want to share among
other files (tables). The file Param.fp5 will have only one record. Its
fields are regular fields not global, while they will act as global for
the rest of the solution. The link field (in FMP6) is a field named
constant = 1 that will exist in all files. Then for example, you put the
'logo' or 'owner' in Param.fp5 once, and have them from FileA with
"Relationship with Param via 1::logo" and "Relationship with Param via
1:wner". Very handy.
Remi-Noel


"Nando" <not (AT) now (DOT) com> a écrit dans le message de news:
tn5of1do9t642r9m8mo5j6r50v1mi210ep (AT) 4ax (DOT) com...
Quote:
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



Reply With Quote
  #3  
Old   
Lynn allen
 
Posts: n/a

Default Re: Newbie question- displying fields from a second table - 08-12-2005 , 12:22 AM



Nando <not (AT) now (DOT) com> wrote:

Quote:
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
--
Allen & Allen Semiotics www.semiotics.com
FSA Associate Filemaker Design & Consulting


Reply With Quote
  #4  
Old   
Nando
 
Posts: n/a

Default Re: Newbie question- displying fields from a second table - 08-14-2005 , 08:59 PM



Thanks guys that was GREAT!! You cannot imagine how many things I was
able to figure out with this information. Very exciting!!


On Thu, 11 Aug 2005 22:22:26 -0700, lynn (AT) NOT-semiotics (DOT) com (Lynn
allen) wrote:

Quote:
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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.