Imagine the following situation:
one table of tasks
one table of Persons
one table of roles
a many to many relation with a join table between tasks and persons
one task can be made by multiple persons
a person can be assign to multiple tasks
a many to many relation with a join table between persons and roles
one person can have many roles
and a role can be assigned to many persons
a layout based on tasks with two portals:
a portal to enter persons with role X
a portal to enter persons with role Y
Everything works fine. With help of some scripting i manage to assign a role X to multiple persons and add it to the portal.
The problem began when i add a portal to role Y and when i add a person that already have a role X, i can´t display that person in both portals.
i add a filtering criteria to the portals. one to show only role X (Role::RoleID=1) and other to show only role Y (Role::RoleID=2). This filter only works for persons that only have one role (X or Y), but if they have both roles assigned only the first one assigned will display in the respective portal.
if i remove the filter from both portals every persons i ad in portal X also appear in portal Y and vice versa.
Everything is working fine internally, I checked the join tables and every values have the correct relationship, but i can't manage to display the same person in both portals at the same time.
I hope i had been clear enough. I really appreciate some help on this. Thanks.