Automation or Action to Update Parent Table when a Child Table is Added Updated or Deleted

Dear Appsheeters,

I found some problem when I create, update, or delete a child record, the Sum Related Child in the parent table wont Update.

It's like it did not trigger the calculation if i do not edit and save the parent.

Is there any solution to update parent table when a record in child table is added, updated, or deleted?

Many thanks.

0 5 124
5 REPLIES 5

Please use reference actions in a data change bot on the child table.

In the example below the "order Details is a child table and Orders is the parent table.

Data Change bot on the child table "Order Details" ( Add , update, delete)

Suvrutt_Gurjar_0-1737708191934.png

Create action type "Run Action on rows" that references the parent table "Orders" and the referenced rows are LIST([Order ID]) which is the reference column in the child table "order Details"

Suvrutt_Gurjar_1-1737708324296.png

 

Create a referenced action "Total Cost Compute" on the parent table that computes the total order cost based on "add, delete or update" to the child table "Order Details"

Suvrutt_Gurjar_2-1737708440393.png

The "Total Cost " is computed in the parent Orders table on each add, delete or update to the Order Details table. The expression in the action is SUM([Related Order Details][Total]) where [Total] is the cost of each line item in the child table

Suvrutt_Gurjar_1-1737708916679.png

 

 

 

 

 

 

Dear Suvrutt,

Thank you for your kind advice.

I already did that before.

In the [Sales Quotation Details] table or the child table, i already made an action.

stephenrich_0-1737709549856.png

and in the Parent table [Sales Quotation] I also made the executing action like below:

stephenrich_1-1737709596897.png

and then, I create an automation in the child table [Sales Quotation Details]

stephenrich_2-1737709652681.png

to trigger this action below:

stephenrich_3-1737709700663.png

But it wont execute the updates on the parent table.

please advice.

thank you.

 

 

 

Please test with  'Custom action" selected in the bot step in place of "U1 Update SQ"

Suvrutt_Gurjar_0-1737713218311.png

 

 

I have. Previously i use this action and place it on my [Sales Quotation Detail] Form behaviour when Save. 

But I think i need to update [Sales Quotation] parent table not just when the [Sales Quotation Details] child table added, but when updated, and deleted. So that's why I also create an automation bot.

But somehow it did not triggered it properly.

And the weird part is, on the desktop version, my virtual column wont sum related child immediately even if i have deleted a child record.

Does this happened because of the slow sync? 

Sorry, I am unable to understand the current status.  Understood that previously you had event action on form save and that you converted to bot.

Could you update if the bot runs properly now with the suggested changes?

Top Labels in this Space