Order total does not update I have an order...

Order total does not update

I have an order app (similar to https://www.appsheet.com/samples/An-app-for-managing-customers-products-and-orders), where I calculate the order total in a similar way:

SUM ( SELECT (Order Details[Total], [Order Id] = [_THISROW].[Order Id]))

When I add new items to the order, the order total does not update; it only updates when I go into the order, go into edit mode and save it again. In the AppSheet example order app, this step is not necessary.

Any idea what goes wrong in my app?

0 10 694
10 REPLIES 10

Use virtual column instead of normal column.

@Aleksi_Alkio that works, thanks a lot!

Is there a specific reason it does not work with a normal column? Ideally, I want to save this order_total value to the database as well, which does not work with a virtual column.

If the โ€œchildโ€ has an IsAPartOf Ref column back to the โ€œparentโ€, then we will also recompute all app formulas in the parent. When we do this, it means we also have to update and save the parent on sync. Otherwise, we will only recompute virtual columns.

@praveen I set IsAPartOf to true, but it does not update

@praveen has this โ€˜recomputing of the parent upon changes to the children if the IsAPartOf is set to trueโ€™ feature live?

Hope that made sense.

I could have sworn it was. Adding @Adam_Stone_AppSheet. Pim, could you try one thing. If you change an existing Details record, does it recompute the app formulas in the parent Order record? Maybe we only got that piece done but overlooked the case where a new Details record is added.

I tried to find a normal column structure like that from my apps but I realized that Iโ€™m always using a virtual column for complex reasons

@praveen also changing an existing details record does not auto update the parent order record

Within a nested form view, all the AppFormulas will update. For example, when adding a new order and then adding line items before saving the order. When adding or editing line items after the main order has been saved (i.e. from the detail view), currently only virtual column AppFormulas will update. We are working on making this more consistent such that all AppFormulas will update in both cases when the line item IsAPartOf the order.

Thanks for the update!

Top Labels in this Space