How can we change values or deleted all related key

Hi all,

I have a table with a primary key and a secondary with ref type instead of creating many child or grandchildren’s tables because I don’t limit how many level ref for this data.
So when I change status or delete the grand-parent row, I wish all related rows such as father, child, and grand-son will be changed or deleted too.

Now if I deleted the Grand-Parent row, AppSheet only update and deleted all parent-rows, can not delete all child rows and grand children rows.
How can we set automation to do this?
Please help,

Thanks

0 7 111
7 REPLIES 7

Aurelien
Google Developer Expert
Google Developer Expert

hi @hien_nguyen

tick option “is a part of” on your children row level, for column that refers to parent

I have doubts on whether that works for a self-referencing Table. Hopefully he tries it and let’s us know!

And if it doesn’t work, you’ll need to use a “reference action”, an Action of type “execute an action on a set of rows”. And for the “referenced row” field in the Action, probably use an expression something like:

FILTER(
  Table ,
  STARTSWITH( [parent ID] , [_THISROW] )
)

I’ve tried this formula but it only deleted all child rows, it did not delete all.

I didn’t even notice that part
@hien_nguyen can you keep us updated on it ?

Hi @Aurelien ,
I am using this way but it only deleted all child rows, can not delete grandchildren rows.

OK, then you might want to use @Marc_Dillon 's suggestion then

Top Labels in this Space