dbTalk Databases Forums  

Relationship involving 3 tables

comp.databases.filemaker comp.databases.filemaker


Discuss Relationship involving 3 tables in the comp.databases.filemaker forum.



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

Default Relationship involving 3 tables - 04-15-2007 , 05:19 AM






Hi

Using FM8.5 Add.

I have a file with three tables, Contacts (Customers Names etc), Invoices
(The Invoices), Items (Items to be put on the Invoice).

These three tables are related in the following manner.

Contacts file via field 'con_ref' to Invoices file via field 'inv_con_ref'
Contacts file via field 'con_ref' to Items file via field 'ite_con_ref'
Invoices file via field 'inv_ref' to Items file via 'ite_inv_ref'

I am experiencing a problem when it comes to printing an invoice. I have set
up a script to go to the report layout (with show records from option set to
'Items file') and print the invoice and the although the data for the
contacts file is the correct data and so is the items file data, the Invoice
file data is that of the first invoice sent to that contact.

I don't understand why the wrong invoice data is being printed with the
correct contact and items data, when the items records are related to
another invoice belonging to the same contact.

Hope that all makes sense!

--
Jeff Wright



Reply With Quote
  #2  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Re: Relationship involving 3 tables - 04-15-2007 , 07:37 AM






Jeff Wright <jeff (AT) jeffwright (DOT) demon.co.uk> wrote:

Quote:
These three tables are related in the following manner.

Contacts file via field 'con_ref' to Invoices file via field 'inv_con_ref'
Contacts file via field 'con_ref' to Items file via field 'ite_con_ref'
Invoices file via field 'inv_ref' to Items file via 'ite_inv_ref'
Skip the first relation. The relation graph must not go in circles.

The relation you want will still be there as invoices are connected to
contacts via the items.
--
http://clk.ch


Reply With Quote
  #3  
Old   
Jeff Wright
 
Posts: n/a

Default Re: Relationship involving 3 tables - 04-18-2007 , 01:59 AM



Hi

Thanks for the help. I understand.

I'm always walking round in circles!!

--
Jeff Wright

"Christoph Kaufmann" <clk (AT) freesurf (DOT) ch> wrote

Quote:
Jeff Wright <jeff (AT) jeffwright (DOT) demon.co.uk> wrote:

These three tables are related in the following manner.

Contacts file via field 'con_ref' to Invoices file via field
'inv_con_ref'
Contacts file via field 'con_ref' to Items file via field 'ite_con_ref'
Invoices file via field 'inv_ref' to Items file via 'ite_inv_ref'

Skip the first relation. The relation graph must not go in circles.

The relation you want will still be there as invoices are connected to
contacts via the items.
--
http://clk.ch



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.