I have three tables. People, Companies and a junction table. The junction table shows the relationship between a person and a company. Sometimes, a person is connected to several companies. I’d like to show that relationship. For example,
This is People table
This is Companies table
Now this is the junction table that basically lists the companies’ employees…
We can see companies are related/connected through people here. For example Joey works for both Scott Co and Keychron, Michael works for both ITC LLC and Keychron.
What I’d like to do is to show how “Scott co” and “Keychron” has a relation because Joey works in both.
As I’m working on this, I was able to show this relationship but it still includes the name of that certain company. like this:
(notice how the “Scott Co” record still includes its name in the ‘related companies’ column.)
I want it to lists all the related companies without including that said company itself.
Unless you want to have information about the relationship (like “Starting Date” for a job), you don’t need the junction table.
You can relate People with Companies directly, and add as many People you want in a Company, and vice-versa. In ever Person/Company you’ll see all the related records together (Scott Co and Keychron in your example).
Here is my use case:
I have a companies table. For each company, I list high level employees of this company (Founders, board members, executives…etc)
Sometimes, a person is a board member in both companies. At least where I am from, this is a connection; a relationship between the two companies. So, in each company’s record, I’d like to list the companies that have this sort of relationship.
As I said, I was able to do this but it includes the company’s name too. like this:
In company A record, related companies are: Company A, B and C. <<< I don’t want A to be listed.
would A script solve this last part at least?