jjfcpa Posted August 29, 2010 Posted August 29, 2010 I have imported some data into two tables. Customers Customer's Products This is a ONE-TO-MANY relationship. The problem is, in the original application, they are related by a field called "custno". After importing, I have managed to creating new fields as follows: Customers primary key = _kp_customer_id Customer's Product primary key - _kp_custprod_id Customer's Product foreign key to customer file - _kf_customer_id After getting the new key fields populated properly and creating new links in the relationship graph, everything works perfectly; however, the links are showing the relationships are many-to-many instead of one-to-many. Will this create a problem, and if so, how do I fix it? I didn't want to create a join table, because based on the data in the tables, it's not necessary.
comment Posted August 29, 2010 Posted August 29, 2010 How did you define the _kp_customer_id field in the Customers table?
jjfcpa Posted August 30, 2010 Author Posted August 30, 2010 It is an text field with an auto-enter calculation using Ray Cogolon's (sp?) base36 uID custom function.
jjfcpa Posted August 30, 2010 Author Posted August 30, 2010 I see my problem. I did not have it set to unique. Now my relationship graph is showing one-to-many as it should. Thank you for the nudge in the right direction.
comment Posted August 30, 2010 Posted August 30, 2010 Filemaker doesn't know that. If the field does not auto-enter a serial number and isn't validated as unique, there's nothing stopping you from entering a duplicate value in the field - thus turning the relationship into a many-to-many. In any case, this affects only the way the line is drawn in the relationships graph and nothing else.
Recommended Posts
This topic is 5260 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now