Jump to content

Relationship across 2 TOC's


Greg58

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

Recommended Posts

I have an experimental file I am looking at.  It has a company table, a contacts table, and a join table.  One company can have may contacts, and one contact can have many companies.  I have inserted 2 portals into the contacts table.  One based on the join table, and one based on the company table.  The portal based on join works fine.  The one based on the company table only shows the one record repeating (Record 2 in this case, see below).

As I say this is just experimenting.  My question is this.  Is it only showing record 2 in the portal based on 'Company' because going through the join TOC to the company TOC, you will only ever see the first record??

Thanks.

 

 

Forum q1.png

forum q2.png

Link to comment
Share on other sites

54 minutes ago, Greg58 said:

The one based on the company table only shows the one record repeating

I see only one field with repeating value - and you're not telling us which field it is. Would it be correct to assume it is a field from the Join table?

 

Edited by comment
Link to comment
Share on other sites

23 hours ago, Greg58 said:

The field is join::company_ID_FK.

That is the expected behavior. It is kind of difficult to describe but a relationship looks only forward, never back. You will get a different result if you place another TO of the join table "behind" the portal TO:

Contacts --< Join >-- Company --< Join 2

and place fields from Join 2 inside the portal. These fields will show data from the first related record in Join 2, starting from the Company in the corresponding portal row. While fields from Join will always show data from the first related record in Join, starting from the current record in Contacts - regardless of the portal row.

Of course, the practical solution here would be to use the company_ID field from the Companies table. 

 

Edited by comment
Link to comment
Share on other sites

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