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

Updating relational field value breaks relation?


bubba667
 Share

Recommended Posts

Hello,

 

I am having a problem with relational tables. As the title sais, whenever I change the value of of a field with a relation, it breaks the relation. Is there a way to set it so that wen the field is changed all the fields in the related table are changed accordingly to preserve the relation?

 

example:

 

Table1:

Contact ID

Name

Address

 

Table2

Contact ID (relation with table 1)

Phone

 

If I change contact ID in a record in table 1, its related records in table 2 are not updated, and I loose the relation.

Link to comment
Share on other sites

That's the whole point of relationships. You can change any field in the parent table and you will still be able to see the related record(s) in the child table. But if you change the ID that relates both, you indeed loose the relationship. So the rule is, don't change it. In fact, lock it from user entry. Have filemaker create it. Set it in the child record using a script or using the allow to create related record option in a portal. Never let users handle relationships.

 

That said, what are you trying to achieve?

 

Maarten

 

PS "what are you trying to achieve?" should be: "why do you want to change the ID's?"

Link to comment
Share on other sites

Well, I work at a security compagny and the contact ID is based on customer last name and last 4 digits of phone number. When the person moves out and someone new comes, we need to update his Contact ID info, as all the info remains the same exept contactID, name,phone# (we have alot more tables than the example)

Link to comment
Share on other sites

Ok. The best thing you can do is stop using this contact ID as a filemaker key. You don't have to stop using it for your work process, but although it is theoretically possible to update all the relationship keys this is a lot of work especially if the keyfield is used in multiple tables. And it's tricky to maintain. And it's not necessary and complicates your database structure. And user created ID keys may seem rocksolidly unique, but they seldom really are.

So always separate filemaker keys that are used for creating and viewing relationships and user keys that are used for, well, user processes such as recognizing a client.

 

But if I may hazard a guess, this is about guarding objects right? So you'll probably have a contract with some company, I don't know a real estate management office, and there are tenants or home owners or people that hire office space.

Are you speaking about the tenants here?

 

Maarten

Link to comment
Share on other sites

Ok. The best thing you can do is stop using this contact ID as a filemaker key. You don't have to stop using it for your work process, but although it is theoretically possible to update all the relationship keys this is a lot of work especially if the keyfield is used in multiple tables. And it's tricky to maintain. And it's not necessary and complicates your database structure. And user created ID keys may seem rocksolidly unique, but they seldom really are.

So always separate filemaker keys that are used for creating and viewing relationships and user keys that are used for, well, user processes such as recognizing a client.

 

But if I may hazard a guess, this is about guarding objects right? So you'll probably have a contract with some company, I don't know a real estate management office, and there are tenants or home owners or people that hire office space.

Are you speaking about the tenants here?

 

Maarten

 

 

yes, but we also do residential :)

 

I will look into making a seperate key for the contact ID. Thanks for the help!

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use