Jump to content

How can I get this many-to-many self-join to show related records?


Chuck
 Share

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

Recommended Posts

I know I've done this before, but can't find an example of the functionality in my archives and can't seem to work out how to do it again.

I've got two tables: PERSONS and CONNECTIONS. PERSONS has an `id` field and CONNECTIONS has `person_1_id` and `person_2_id`. There's a relationship from PERSONS to CONNECTIONS with `id` = `person_1_id` and from CONNECTIONS to another TO  into PERSONS, connections_PERSONS, with `person_2_id` = `id`, but these relationships may need to change to make this work.

On a layout with a context of PERSONS, I need a portal into CONNECTIONS that shows the names of the person on the other side of the relationship. So if Bill and Ted are connected, when viewing Bill's record I see Ted in the portal and when viewing Ted's record I see Bil's record.

Edited by Chuck
Link to comment
Share on other sites

This topic is 1539 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
 Share

×
×
  • Create New...

Important Information

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