AnsweredAssumed Answered

Relationship problem

Question asked by strngr12 on Jun 26, 2014
Latest reply on Jun 26, 2014 by ChadAdams

My girlfriend doesn't seem to understand me.

 

That aside, I also have a relationship problem in a Filemaker script I am trying to build.

 

I have a table and in it is a unique value. I have another table and in it are exactly two records that have a value that matchs the unique value form the first.

 

Each of these two records in the second table have their own unique value that I need to get back into the first table.

 

So,

 

Table1:name = abcd (there is only one record with this value)

Table2:name = abcd & ID:1234

Table2:name = abcd & ID:5678

 

Now, those two records in Table2 are for two different kinds of things - let's call them 720 & 1080. So, further:

 

Table1:name = abcd (there is only one record with this value)

Table2:name = abcd & ID=1234 & Type=720

Table2:name = abcd & ID=5678 & Type=1080

 

So, to make sure I can tell the difference between them for export to the other table, I define a field that is empty unless it is the right type. I can do this because each record also has a field telling me which type it is, so:

 

Table1:name = abcd (there is only one record with this value)

Table2:name = abcd & ID=1234 & Type=720 & TypeID720 = 1234 & TypeID1080 = ""

Table2:name = abcd & ID=5678 & Type=1080 & TypeID720 = "" & TypeID1080 = 5678

 

Finally, to get both of those records to relate to table 1 so I can get both IDs and know which type the ID is I have:

 

Table:name = abcd & TypeID720 = 1234 & TypeID1080 = 5678

Table2:name = abcd & ID=1234 & Type=720 & TypeID720 = 1234 & TypeID1080 = ""

Table2:name = abcd & ID=5678 & Type=1080 & TypeID720 = "" & TypeID1080 = 5678

 

The problem is, while all the calculation fields work as expected in Table2, the type fields in Table1 only populate for whichever type record comes first in Table2, so if the first record in Table2 is a 720 record, I get:

 

Table:name = abcd & TypeID720 = 1234 & TypeID1080 = ""

Table2:name = abcd & ID=1234 & Type=720 & TypeID720 = 1234 & TypeID1080 = ""

Table2:name = abcd & ID=5678 & Type=1080 & TypeID720 = "" & TypeID1080 = 5678

 

And if the 1080 record comes first I get:

 

Table:name = abcd & TypeID720 = "" & TypeID1080 = 5678

Table2::name = abcd & ID=5678 & Type=1080 & TypeID720 = "" & TypeID1080 = 5678

Table2:name = abcd & ID=1234 & Type=720 & TypeID720 = 1234 & TypeID1080 = ""

 

So, basically, the Table1 single record relationship to two records in Table2 doesn't seem to work. Any advice?

 

Thanks,

 

Dan

Outcomes