Please state your actual names instead of the abstract ones as it will help us.
What is the purpose here of these tables. Perhaps we can offer insight to your structure.
Dear Mr. V,
It's a FM solution for a town historical society's collection -- the main purpose is to allow family members to research the collection and find out information about their ancestors and to connect these bits and pieces to the town's history.
The collection contains about 10,000 Objects (photos, documents, etc). Many of these have already been grouped into many Catalogs [C1], according to common subject matter. Many Objects have also been grouped together with many individual Person records [C2] e.g. photos of a Person or documents in which the Person is mentioned -- there are about 10,000 such people listed in the town's census records.
Individual Catalogs themselves can be put into larger Groups. The Group Catalog table is the Catalog table's parent. [P1 and C1]. Individual people are members of larger Families. The Family table is the Person table's parent. [P2 and C2]
But sometimes, it's useful to include one or more relevant Catalogs in a particular Family's record (along with Family Persons), and likewise it's useful sometimes to include one or more Persons in a particular Group Catalog's record (along with several Catalogs).
I have no problem with getting C1's into a P1 portal, or C2's into a P2 portal, but including C1's in P2 or C2's in P1...
Any insight is much appreciated.
Look into the List () function. You can use it to grab a multi-line list of the IDs. As may may already know, in FileMaker multi-lines in a field can be used to match multiple records when used as a key field.
Also this link may be of interest to you.