Portals, multi column relations

Hello.

I have a solution where there are tables for employees and projects. Every project has many employees attached to it. I’d like to have a portal on the Employee form for all the projects the employee has participated in.

I have tried to add lots of columns to the project table(employee1, employee2, …) and tried to use multi column relations to connect them to the employee table, but that did not work. Do multi column relations work on an AND or OR principle?

Is there a better approach?

Thanks in advance.

jw

The ‘official’ way to do this is to create a so called n-m table that will allow you to create an n-m relation (many to many) between the two tables. Create a table called employees_projects that contains:
employees_projects_id INT PK
employee_id INT
project_id INT

and relate both the employees table and the projects table to it. Using a tabless tabpanel on both sides you can relate the records into the employees and project forms.


Do multi column relations work on an AND or OR principle?

AND principle