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

Deleting 1 record deletes ALL records?


benjmark1958
 Share

Recommended Posts

  • Members

I checked several other prior data draft bases and the relationships are the same and some delete all and some don't..

 

Link to comment
Share on other sites

Can you upload an empty (and password-removed) clone of your database?

 

NOTES:  It does indeed seem most likely that a relationship is involved, one that is set up so that when a record is deleted, it deletes the corresponding related records — and my guess is that under some (but not all) circumstances, a record can be related to all the others and hence takes them all with it when it goes.

You said (in the thread title) that Deleting 1 record deletes ALL records.  I assume you mean "in the same table"?  If so, that implies a self-join relationship, or else a daisy-chain of relationships where a second table occurrence of the main table exists on your graph, attached to a child table in such a way that some child records could have all of the records in the main table — via the second table occurrence — as related records.

Link to comment
Share on other sites

  • 3 months later...

That's not the question that you asked in the other thread.  You didn't say "...and just the related parent record".

You're using a cartesian join relationship for the portal in question, correct?  So definitely DO NOT check the checkbox "Delete related records in this table when a record is deleted in the other table" in the cartesian relationship.

 

But if there's a genuine parent record, there must be a different relationship that defines that parent-child relationship.  I don't think you want to check the checkbox for automatically deleting related records within that relationship, either, though, unless you always want to nuke a parent record whenever you delete any single one of the child records, and that's not a typical structure.  (Going the other way, yeah—lots of time you want to destroy all the child records when you delete a parent record.  But you say you want to go the other direction).

 

I would script it.  First go to related records (cartesian relationship via the portal).  Second, do a second Go to Related Records   (child ---> parent) showing only related recs, in a new window, then do a no-dialog Delete All Records and close that window if it exists.  Third, delete current record (this will be the child record).  Fourth, return to original layout.  

 

Link to comment
Share on other sites

  • 3 weeks later...

It's also important to know that if you have the "Delete related records in this table when a record is deleted in the other side" turned on for a table occurrence...if you delete that record that triggers the deletion of related records on ANY table occurrence, this cascading delete will fire.

 

 

Link to comment
Share on other sites

I was responding with relevant information from the OP. It would be best if you started your own thread. It may cause confusion for other readers. 😆

Link to comment
Share on other sites

On 8/8/2020 at 4:14 PM, AHunter3 said:

I would script it.  First go to related records (cartesian relationship via the portal).  Second, do a second Go to Related Records   (child ---> parent) showing only related recs, in a new window, then do a no-dialog Delete All Records and close that window if it exists.  Third, delete current record (this will be the child record).  Fourth, return to original layout.  

 

Seems like this would work.

Link to comment
Share on other sites

  • 4 months later...

HELP I have this problem too In Filemaker 19 - the deletion works correctly in older versions of Filemaker. Interestingly it works correctly when I first add the parent record - but if I return to that record, it deletes the parent record AND all related records. I have downloaded the update (version 19.2.1.14 (11-17-2020)

 

Link to comment
Share on other sites

If related records are being deleted along with the record you intended to delete (and manually DID delete), then either you have a relationship set to delete related records or you've got something scripted that is being triggered at times you didn't intend.

 

If you upload an empty clone of your file and tell me what layout you are on when you delete a record, and which table or layout has the related records that disappear along with it, I'll take a look.

Link to comment
Share on other sites

HELP I have this problem too In Filemaker 19 - the deletion works correctly in older versions of Filemaker. Interestingly it works correctly when I first add the parent record - but if I return to that record, it deletes the parent record AND all related records. I have downloaded the update (version 19.2.1.14 (11-17-2020)

Thank you - herewith clone - we have been adding donations on the Main contact screen layout and this is where I delete - the related table is donation.

F4K Donor Management Clone.fmp12

Link to comment
Share on other sites

It's password protected.  You'll either have to give me the account and password or make a different clone and remove the security on it, in order for me to get in.

Link to comment
Share on other sites

You have a table occurrence called "Donations 5" and it has delete related records set up on BOTH sides of the relationship.  That's your most likely culprit.

 

From absolutely any context, if a Donations record gets deleted, it will delete the parent record from the Contact Information table along with it.  And vice versa.

Donations 5.jpg

Link to comment
Share on other sites

Ohh - Thank you - I had no idea that Donation 5 would affect the portal as it is related to the Donations occurrence.

I will be much more vigilant in future - I truly appreciate your help :)

 

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use