PDA

View Full Version : many to many relationships


jlevine
05-10-03, 22:28
first, apologies - i'm doing some work for a non-profit and they're still using FMP 4.0, so those of you in the 6.0 world may run into some unpleasant memories here.

so, is there a "standard" way to do many to many relationships?

i come from an SQL background, and feel like a many to many relationship shouldn't be too hard with filemaker. i've read it's unsupported for 4.0 but there's gotta be a way.

everything i've found involves relationships based on calculated fields that equal "1", a lot of code, or something else that seems a little weird, or "magical".

i guess i'd be ok with these solutions if someone explained what those relationships and code do. i'm still having a bit of trouble picturing how this will all be intuitive to a user. any suggestions much appreciated.

omiossec
05-25-03, 18:17
Originally posted by jlevine
first, apologies - i'm doing some work for a non-profit and they're still using FMP 4.0, so those of you in the 6.0 world may run into some unpleasant memories here.

so, is there a "standard" way to do many to many relationships?

i come from an SQL background, and feel like a many to many relationship shouldn't be too hard with filemaker. i've read it's unsupported for 4.0 but there's gotta be a way.

everything i've found involves relationships based on calculated fields that equal "1", a lot of code, or something else that seems a little weird, or "magical".

i guess i'd be ok with these solutions if someone explained what those relationships and code do. i'm still having a bit of trouble picturing how this will all be intuitive to a user. any suggestions much appreciated.

To make many to many table relation in fmp you will need 3 fmp db

A, a_to_b, and b for example.

a_to_b is in relation with A and B

So you can insert calculted fields in a_to_b that read related data from a and b so in A by relation you can read data from B in A.

Your a_to_b db look like

id
ref_a
ref_b
data1_froma calcul
data2_froma calcul
data1_fromb calcul
data2_fromb calcul

Joker2k_2003
04-19-04, 09:59
Is there another way of getting information for table A without using calculation fields in FMP 6?

Jerry Maloney
04-20-04, 11:24
Originally posted by Joker2k_2003
Is there another way of getting information for table A without using calculation fields in FMP 6?

No. You need calc fields in a_to_b.

However, it IS possible to do this without calc fields in FM7. The relationship structure has been changed to make it much easier to do one-off relationships; if A is related to A_to_B, which is related to B, B can draw data directly from A.