Child Table entry not deleting when parent is deleted

Jonathan_S
Participant V

Hey Guys,

For some reason my Child Tables are not deleted when the parent table is deleted.

Strange this is, the child also has children. the children from the child are being deleted but the child itself isnt.

Any insight on this?

Parent. I deleted this recored
- Child is part of Parent. Does not delete
-Grandchild is part of child. Deletes.

0 23 1,591
23 REPLIES 23

I have no real insight except to ask whether youโ€™ve set this at each level?

2X_7_7474b9306f7fa202ec03b90e21a115a0d420d817.png

Maybeโ€ฆ

Yes the child is part of the parent and the grandchild is part of the child.

Thought that would be too easyโ€ฆ

Then sorry I cannot help any further.

Thanks for your help.

One last random thoughtโ€ฆ

Is the Child ONLY part of the Parent OR is it referenced to another record?

Good Question,

So there are 2 other columns that are referanced from other tables.
Customer, so they can select customer from the customers table, and Type, which is from a table of types.
but in saying that, they are not part of the other tables.

They only way to add to this table is from the parent table.

Check this:

Other than that I have no idea.

Checked that all good :).

Thank you.

i have the same problem, does allowing the deletes check make it work?

Do you have any records that have just vertical relationships. (ie no Customer records or any other referenced records) If so, cab you cleanly delete them?

Could you clarify?

If you have a clean line of Parent - Child - Grandchild records (with no other relatable records associated at any level) will they all cleanly delete?

Yes they will all delete.

But even though I have reference it should still delete no? Iโ€™m not seeing why not. Is there any documentation on this?

2X_7_7474b9306f7fa202ec03b90e21a115a0d420d817.png
This clearly states it In would think.

Sounds like a possible bug. I suggest engaging support@appsheet.com.

Done. Request Sent out.

MultiTech
Participant V

I have seen this happen before as well, and itโ€™s not new - itโ€™s an on-and-off again issue. Hopefully theyโ€™ll find the cause and get it fixed.

In the meantime you could create a workflow action to delete all child records manually.

What would be the best way to do this?

On Delete from my Parent Table
Make a action to delete all associated records in child table with parent table id?

How would I make it delete them all?

Iโ€™ve built an In-App Guide to help guide people through this process; you can check out the original post here (it details how to add the public in-app guide table to your app)

Youโ€™ll want to review the โ€œDelete Child Records with Parent Deleteโ€ guide

Wow, Must be a rather problematic bug to have to go through this. @praveen.

Thanks @MultiTech_Visions

I am seeing the same issue, but it is inconsistent. I have two very similar cases in my app in which I have parent tables each with 3 child tables. Each of the children references two other tables for a field lookup (not a part of). One instance works consistently as expected - deleting the parent deletes all children. But in the other almost identical set of tables, deleting the parent always leaves the children behind. I have inspected the table contents very carefully via SQL query to make sure that the references between the values in the tables is correct and consistent. All table keys are good, unique, and properly referenced. I have also carefully reviewed the โ€œIs a part ofโ€ setting to make absolutely sure the child table is properly marked as such and is only the child of one parent table.I am working online and forced a sync after performing the delete. For the life of me I canโ€™t figure out why one works and one doesnโ€™t!

I will be opening a support case with AppSheet but I wanted to crowd source this also because it is a major problem for me and it sounds like there might be a big fat bug here.

Yes still not fixed for me either.

I am working with support and will let you know what we find.

Bahbus
Participant V

I use a report for cleanup deletes nightly just in case. But I havenโ€™t seen the issue crop up in my usage recently.

Top Labels in this Space