Monday, July 13, 2009

FILEMAKER: Delete Parent Table Equal Delete Of Related Child Records?

From Dwayne Wright - Certified FileMaker 9 Developer
WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright

APPENDIX 3: A Reader Asks

A READER ASKS
Two tables connected with the auto delete related records setup, what happens if the parent table is deleted from the graph entirely? Are the records that were related to the parent table deleted by the action of the table being removed. What about if just the table occurrence itself is removed by not the table?

-------
DWAYNE RESPONDS
When you define a relationship, you can define an option to delete related records when the parent record is deleted. This is a great way to cleanup orphaned related records when the parent record is deleted. It is a nice feature but I do ask that you consider the consequences of this feature about before implementing.


I haven’t run across a delete parent table with the associate related delete option enabled in the “real world” but your question is an excellent example of some questions that you should consider before implementing this setting. In my research of FileMaker blogs and books, I didn’t find this particular question addressed. So I decided to build an example file, set it up with the exact settings you described and give it a go. In the movie linked below, you will see that my tests seem to indicate that related records ARE NOT deleted if the parent table is deleted.

Here are some links to other posts that might be of interest in regards to this topic...
Cascading Deletes

This setting will delete any records in a child file related to a parent record.


There is a related movie on this topic! CLICK HERE!


=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.

ADVERTISEMENT ==============================
Looking for a robust FileMaker CRM template to manage your business? Check out the InBizness product line at http://www.dwaynewright.com/solutions.html.

0 comments: