AnsweredAssumed Answered

Creating a Relationship Between 2 IDs on 2 Different tables Portals

Question asked by KAmsinger on Mar 16, 2011
Latest reply on Mar 21, 2011 by philmodjunk

Title

Creating a Relationship Between 2 IDs on 2 Different tables Portals

Post

I have a database that has several tables in it. Using FMP Advanced 10

1 table is called PERSONS which has a ID assigned to each record per persons profile.

I have a 2nd table called Groups which I can add a group from a valued list to assign to a person profile in the PERSONS table.

These relationships are shown in 2 places. In the Groups table there is a portal showing all the Persons assigned to that 1 particular Group, and I have it setup where you can click a button next to each persons name it takes you to that persons profile in the PERSONS table. And in the PERSONS Table I have a portal showing all the groups assigned to that person and you can click on a button next to the groups name and it takes you to that particular group on the Groups Table.

I setup the above Group system using the example file 06a_FTS_Meetings_Solutions.fp7

I want to create a new type of groups that has a different but similar functionality. Here is a new type of group I want to setup lets call it Client Date List.

1. I want it where if I check a box in the PERSONS table on 1 particular persons profile it creates a new group in the Groups table and creates a relationship between the new Group ID and that particular Persons ID that I checked the box on their profile, and I want it where the group is automatically named with that persons name.

So for example if I was in John Doe's profile, in the PERSON table, and I checked a box on his profile it would automatically go into the Group table create a new record or Group, named John Doe and adds John Doe's name to the Value List, and have a relationship setup between John Doe's PERSONS ID (_kp_Person) and the new Group ID (_kp_GroupID).

2. Then in the Groups table I want a portal that I can add people to John Doe's group. 

3. in John Doe's Profile in the PERSONS table I want a portal that will show all the people assigned to his group and his group only.

4. And then another part of this is in the PERSONS table,  I want a portal showing the Group assigned to that person. So if I wanted to Add Jane Smith to John Doe's group, on Jane Smiths profile in the PERSONS table there would be a separate portal that shows John Doe as a group assigned to Jane Smith. 

Side Note: both John Doe and Jane Smith are on the same table PERSONS and have their own unique PERSONS ID for each of them. 

I already have it setup to show in the GROUPS Table the list of people assigned to that group. Also, have it setup that in the PERSONS table the List of Groups assigned to that person. 

What I need setup is the check box to create the new group in the Group Table and link the PERSONS ID and the new GROUP ID together, name the group the Persons Name (John Doe) and add their name to the valued list, and have the portal on the John Doe's profile in the PERSONS Table to show all the people (Jane Smith) assigned to his group and his group only. And when someone is added to his group it adds their name to the portal in the Group Table for that particular group (John Doe) and adds their name to the portal in John Doe's profile only in the PERSONS Table.

If you need an example file I would be willing to up load to gain assistance with this, I am completely stuck. 

Outcomes