How to flag a DB item that just got removed from a list of DB items

I have 2 DB things: Parents and Children

The Parents thing has a field which is of type “list of Children”:

Sometimes, I am setting this list to another “list of children” items. How can I flag the Children that are removed from the initial “list of Children” and mark them as “orphan (yes/no) = yes”. In the example below child 1703772323404x503224802168584600 is not in the initial “list of Children” (or in any other “list of Children” for that matter) anymore and needs to be marked as “orphan (yes/no) = yes”.

Note that I am not changing the “List of children” by using the “remove from list” step so I can’t just remove from list and mark as orphan=yes. Instead, I am setting the list to another list and suddenly some Children become “orphans” and I want to flag them.


Explore a database trigger that creates an eventLog or perhaps an emailSend that can alert you

Thanks @cmarchan
Looks like I can’t set a DB trigger such that “Parent’s list of children now is not Parent’s list of children before” unfortunately. And sending myself an email won’t work since i want to flag orphan items right in the DB.

Try before is not now

how about you store the current list of children to a custom state, then after setting a new list, you make changes to items in the saved list that are not included in the new list? will that work?

Good idea, i’ll look into it. thanks!

This topic was automatically closed after 70 days. New replies are no longer allowed.