Bulk Delete Data with parent child relation

Hi all,

I examined the forum and found some workaround solutions, but they did not work efficiently.
My database has parent-child relations like X -->Y → Z–> T. So when the user wants to delete any parent, the belonged child must be deleted. If my database table has 2 dimensions, a suggested method delete using a countdown workaround solution is ok. But my table structure has more than 2 dimensions. So anybody recommends any solution to me?

Thank you in advance.

Are you using a many to many relationship? If you are then instead, you could have a join table then you could just delete one record and it would in theory be deleting multiple links, does that make sense?

Actually, my tables have a 1 to N relation, so when I (as a user) delete a 1 parent record, I want to delete N child records related to it. Bulk delete means that I want, delete a record based on any condition like the “where” condition in the SQL.

Noone helps me :frowning: I am stuck here, and I almost finish my app :frowning:

We do not have this functionality yet within Adalo. But you are able to do this using the Adalo Collections API.

In your X collection, you could add ID property which is unique, then when you create Y, Z, T etc, use the same ID as in X, so when you create list to delete, you can filter based on ID.

Hi, @crmorris2 , how do you use join table within Adalo ? (I am having issues implementing my data with my airtable). Do you have some references I could read to guide me?

Hi all, would like to bubble up this discussion, as the others are locked.

I browsed other posts about using countdown timer approach, however I don’t understand how to do it automatically for all child records (say more than 10, that a screen cannot show all). Seems to me the countdown timer approach needs us to add a timer for each row on screen (in the demo video, there were only 3) … it’s quite tedious and what about rows that will not show on screen ?

Did I miss anything about this approach, and any other solutions ?

Thanks a million !!

Cheers, Michael

One minor thing, somehow the countdown timer will not replicate to each child record and therefore I have to add the timer one by one to each row … may be I did something wrong (?)

In a custom list, just drag the countdown component inside the row, then it replicates throughout.
:+1:

Yes I tried that but it didn’t work … somehow the child collection disappears… Will try again and thanks !!

Is it a nested list? That’s probably asking too much.

I would only do it on a parent detail screen with a list of child items.

No problem and thanks for the help again. No it’s not a nested list. Will try again !!

1 Like