Jump to content
Server Maintenance This Week. ×

Self join


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

Recommended Posts

I have a self join setup that is of a parent-child relationship. With some of the records, there are multiple level parent-child relationships. What I'm trying to achieve is to get a list of parent-child-grandchild, etc. Using a portal I can achieve the first relationship but haven't been able to figure out a good way to get the entire tree of relationships.

Eventually I will need to get a count based on a quanity field of the children and grandchildren but first things first.

I used FileMaker fairly extensively with 5.5 but haven't in several years and am new to 7 so I haven't worked all the news features out yet.

Link to comment
Share on other sites

In order for the grandchild to show in the relationship, it must have the ParentID as part of the grandchild's match field, probably in a multi-key. To show all decendants in the relationship, each node must have all IDs for its parents, grand parents, etc., as part of the multi-key.

This is the same kind of structure that is used in hierarchical menu portals. I think Ugo had a good demo of this somewhere. Though it was made in FM5/6, the concept is the same for FM7.

Link to comment
Share on other sites

This topic is 7119 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.