Jump to content
Salesforce and other SMB Solutions are coming soon. ×

one to one relationship


kristinacrows

Recommended Posts

Hello all

 

I am using Filemaker pro 8.5.

I have created a database using one-to-one relationships to connect the Main "Contact" table to types of Contact Tables ("Staff" table, "Audience" table, "Funders" table, etc)

 

in the define relationship graph, I have defined the relationship between the "Contact" table and the contact type tables as such

 

Contact ID=Contact ID

Relation=Relation

 

the Contact ID is a unique serial number generated by the computer.

the Relation is a Value List containing all Contact Types (Staff, Audience, Funders, Etc). In their Respected tables, there is an auto-enter to input the correct value from the value list into the Field (staff for staff, audience for audience) the Value list on the "Contact" table is a normal value list.

 

Now, the auto create check box is selected between the Contact Table and all other Tables in both tables in the define relationship dialogue box.

 

when I create a new record in "audience" table, a related record is created in "Contact" Table. Yet when I create a new record in "Contact" with audience value selected in the Relation Field, no related record is created in "audience" Table.

 

Question: How do I ensure a related record will be created in related Tables when I create new records in the "contact" table?

 

Do I need a Calculation? what type of Calculation? or a script? some guidance would be much appreciated. I am stuck.

Link to comment
Share on other sites

You really don't need the Relation filter if these are one-to-one relationships. Relating via the ContactID should be sufficient.

 

Unless every Contact has all those Types, it's probably not necessary to populate those tables until they are needed. One suggestion it to only use the relationship to populate those tables, by having the "Allow creation of related records" option checked for those tables, and simply placing the related fields on the Contact layouts. As data is entered into them, the related records will be created.

 

Or, if you want finer control, use a script to take the ContactID and create a record in whatever table, then insert the ContactID.

Link to comment
Share on other sites

I see what you are saying. Maybe I don't have a one-to-one in both the Contact ID and the Relation?

 

The issue is that I am unable to place fields from the audience, staff, donors, etc tables on the main "Contact" table. I wanted to compartmentalize the information specific to each type of contact. Otherwise having all those separate tables would be kind of pointless. they do have related fields, but they derive from the "Contact" table (like name and address).

 

I can pull up the information from "Contact" table on the related table "audience" by typing in the Contact ID, no problem; but I just want it to be created automatically so I don't have to go back and forth having to remember to create a related record in the appropriate table.

 

If I change the relationship between each table to just be Contact ID=Contact ID, than a related record would be created in ALL connected tables instead of just audience, or just staff. That’s why I thought having the addition of Relation=Relation would solve that problem, but it's not auto creating.

 

Does this make sense? Is there an alternative solution that might be able to solve my problem?

 

Thanks so much for your time.

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use