Hi, I have a parent table and a child table....

AndreiT_Vlad
Participant II

Hi,

I have a parent table and a child table. In form mode i can add multiple child rows to the reffed parent row.

Now a column in the child row is calculated based on a value from parent row. Something like this =[ParentID].[ParentColumn].

The problem is if i change the value from parent row the child rows are not updating the column calculated based on the parent value.

Is there a way to trigger this?

Thank you!

0 11 1,904
11 REPLIES 11

One way is if you make that calculation with a virtual column. Now you are doing it with normal column and app formula but it will be recalculated only when you open and save the record.

AndreiT_Vlad
Participant II

Thanks! There is no other way around to automatically update?

Check this sample app that I have created. The name is Event Action. Itโ€™s the oppositeโ€ฆ when child record is updated but the principle is the same. appsheet.com - - portfolio of mobile apps created with AppSheet - portfolio of mobile apps created with AppSheet appsheet.com

Hi Aleksi, I was copying the event action How to update parent record when child record is updated app and so far I have tried everything and double checked but it still doesnโ€™t work. Does it have something to do with the fact that the price I want to be updated depends on a formula in GSheets? I mean, the Sum function is taking values from a formula in the database (Prices*Quantities).

Thanks for your help!

@Aleksi_Alkio Hello Mr Alkio, I have 2 tables, parent table is Order, child table is OrderDetails, thatโ€™s say I have many order details within 1 order, order has OrderID and order details has OrderDetailsID.

What I want to do is, when Order Status changes to ex, new order, packing, shipping, delivered, paidโ€ฆect , then individual OrderDetails status details change to same thing.

In the Behavior - Actions,

what the formula should look like? now I use a sheet formula and it become very slow when loading and syncing.

Please help, Thank You

I would create virtual column with a simple deref expression like [OrderID].[Order Status]. Then action is not needed.

@Aleksi_Alkio Thank you for reply, I forgot to mention, the reason I use real column instated virtual column because I need that column to do the security filter

You could basically use the same syntax for your security filter. What is your existing formula for your security filter?

@Aleksi_Alkio my current security filter as follow switch(LOOKUP(USEREMAIL(), SalesRep, Email, Permission), โ€œDistributorโ€, [Area] = LOOKUP(USEREMAIL(), SalesRep, Email, Area), โ€œSalesโ€, and([Area] = LOOKUP(USEREMAIL(), SalesRep, Email, Area), [Email] = USEREMAIL()), True) I have the same security filter for the Order and OrderDetails Table, and I want to add OrderStatus as other security filter for the OrderDetails Table

You could read the status from the parent table for your security filter like NOT([OrderID].[Order Status]=โ€œDeliveredโ€)

@Aleksi_Alkio great, thank you for instant reply, Iโ€™ll give it a try

Top Labels in this Space