Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

problem: delete related record in this table


This topic is 5993 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted

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.

Posted

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).

This topic is 5993 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.