August 25, 200817 yr Consider Table A and Table B. I have more than one related pairings of these tables like this: A to B on serial, delete related records in B when records in A are deleted. A1 to B1 on serial, delete related records not checked here. There is no connection between AtoB and A1toB1. Now I'm in a layout based on A1 to B1 and I delete an A record. All related be records are being deleted as though I was in a layout based on the first relationship. Am I misunderstanding this feature? Regards, Don Drake
August 25, 200817 yr The purpose of automatically deleting related records is to prevent having orphans in the related table. When a record is deleted, it is deleted for all purposes. It doesn't matter in which layout or TO it was deleted. It doesn't exist anymore, and when you switch back to a layout based on A, it won't be there.
August 25, 200817 yr Author That doesn't really answer the question. Here is more detail and a reason WHY I want this feature. I have people records I have location records Several people may be at the same location Any person can link to any number of locations To accomplish this I use an in-between table containing a link to the person and a link to the location, a bridge record. I may want to sever a person from a location, but there may still be other people at that location. In this case, I want to delete the bridge record (but not the location, obviously). In other circumstances I will want to delete everything and leave no orphans as you describe. So? I know it's possible to allow CREATION of related records differently in different layouts and TOs. Why is deletion different? Regards, Don Drake
August 25, 200817 yr The implications of Filemaker's table vs table occurrence framework is confusing, but if you read the fine print: "Allow creation of records in this table via this relationship" "Delete related records in this table when a record is deleted in the other table." So the creation is relationship based. You will only be able to create records when viewing from a TO with that checked off. But the deletion is not. A record deletion will cascade, regardless of the TO is occurs on. I'm not sure you need to worry about locations being orphaned in your set up, but if you are, I think you'll have to script the process.
August 25, 200817 yr Author Thanks. Not what I was hoping to hear, but that reading makes sense. Regards, Don Drake
August 25, 200817 yr I may want to sever a person from a location, but there may still be other people at that location. In this case, I want to delete the bridge record (but not the location, obviously). That is easily accomplished by having automatic deletion turned ON for the join table (in the people -< join table relationship), and OFF for the records in the locations table (in the locations -< join table relationship). I don't see that creation is that much different from deletion. When a new record is created, whether through a relationship or in any other way, it is created in the base table - and it exists in all occurrences of the base table and their layouts (subject to found set).
Create an account or sign in to comment