Help with behavior action: Updating the parent table when the child is deleted

Is it possible to update the value column of the parent table when the related child is deleted using behavior actions, all without involving a bot?

I’ve been using “Data: Execute an action on a set of rows” but it’s not working as expected.

Hi @alhazen

In a sequence of actions, every action coming after a delete won’t be triggered.

I would suggest:

  1. set the values to zero, then trigger your action “update_pdf_from_submaterial_estimate”, then delete

  2. using a virtual column for your parent value to update, as it is calculated on the fly and does not require any data action to be triggered

  3. using a bot to update the parent item after any change

For reference:

Use virtual columns - AppSheet Help

Events: The Essentials - AppSheet Help

1 Like

Could you please explain in more detail about option number 2? Thank you in advance

I suggest you read this:

Basically, let’s say you have one table ORDER and one table ORDER_DETAIL, then you can have the sum of the order details calculated at the level of the order using such virtual column:

SUM([Related ORDER DETAILS][price])