Child Table entry not deleting when parent is deleted

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.

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

Screenshot 2020-05-01 at 19.55.43

Maybe…

1 Like

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.

1 Like

Thanks for your help.

One last random thought…

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

1 Like

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.

3 Likes

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?

1 Like

Checked that all good :).

Thank you.

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?

Screenshot 2020-05-01 at 19.55.43
This clearly states it In would think.

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

2 Likes

Done. Request Sent out.

1 Like

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

3 Likes

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.

3 Likes