Jump to content
Server Maintenance This Week. ×

>1 relationship between TOs indirectly


This topic is 6501 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Only one relationship can occur between table occurrences. FileMaker asks me to create a new TO when I create a relationship that violates the rule I just stated. I have a database in development that has TOs connected something like this: A-B-C-D-A (some of the TOs are join tables). I'm able to create this in the graph, but during troubleshooting it seems like (at least) some of the TOs are in effect related twice, due to the chain (sort of circular, if you know what I mean) effect. The reason I state that, is that some relationships are not working, until I break the chain with a new TO (more hub and spoke-like). Can anyone comment on this? Or is it entirely dependent on a variety of details in the graph? Thanks.

Ken

Link to comment
Share on other sites

The db tracks learning assets to the teacher who requested the asset (the "acquisition" of the asset), etc. I've stripped out detail for clarity, but nothing that affects the problem I encountered.

The join tables are colored purple (in the posted graph snapshots).

The Asset to Asset|Teacher_Acquisition relationship allows creation of related records in the Asset|Teacher_Acquisition (join) table.

LAYOUT: Asset|Teacher_Acquisition

BASED ON (TO): Asset|Teacher_Acquisition (a join table)

zkf_Teacher_ID A Pop-up based on a value list using values from field: "Teacher::zkp_Teacher_ID" and "Teacher::NameLast".

Teacher::NameLast (supposed to get filled in automatically)

Choosing a value for zkf_Teacher_ID works as expected, and leaves a valid value from the primary key field in this foreign key field, however, the NameLast field does not get its value set.

Just to cover my bases, I also tried setting the layout based on Asset|Teacher_Acquisition 2, and the Teacher::NameLast field gets propagated, but when I try to set the zkf_Teacher_ID field, I see proper values, but get: "This operation cannot be performed because one or more required related records are not available and cannot be created."

Note also that I have a layout "Assets" based on the "Assets" TO, and a portal to Asset|Teacher_Acquisition, and the Teacher::NameLast does not get filled in there either (even with the current record already having its primary key value, etc., set -- in case it matters).

When I create a second TO based on Teacher (TO: Teacher 2), delete the Asset|Teacher_Acquisition TO, link Teacher 2 to the join table, re-point Teacher::NameLast in the Asset|Teacher_Acquisition table to the Teacher 2 TO, all is well.

So I'm wondering about this sort of circular set of TOs and relationships, or perhaps just the Teacher TO's relationships to the other two join tables causing the problem. It's not that I want this big (sort of circle); just curious as to the underpinnings (that cause the problem). Thanks.

Ken

not_OK.gif

OK.gif

Link to comment
Share on other sites

  • 1 month later...

I think I've basically figured out the problem. As I continued developing this, when I was creating a layout for the join table TeachingDept|TeacherInstance, I could get TeachingDept information to populate from its TO, but not Teacher info, from its TO.

The cause may be a simple one, which is that (it appears) a join table should only have one TO (it had two, created by the graph), since it pulls information from > 1 TO (but of course there is a 1:1 relationship between a layout and a TO). The fix came when I deleted the 2nd TO of the join table, and created a second TO of the Teacher base table to attach to it.

Ken

Link to comment
Share on other sites

Hi Ken, The reason for no loops is because of the ability to see tables multiple hops away. If there were a loop, then you wouldn't know from which direction the data was pulled. What it means is we have to be explicit on how tables relate to one another, and choose the correct context (TO) for every calc, layout, and script.

In fact, join tables can have multiple TOs on the graph without causing problems. I suspect that your calcs or lookups were using the wrong context.

Link to comment
Share on other sites

This topic is 6501 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.