Hi,
Iโm building out a quoting app, and Iโm having a hard time with getting Appsheet to update a value, based on the sum of other values. For my quoting app, I have a spreadsheet for quotes, and a spreadsheet for two things that go into my quoting items - manufacturing time and materials. Since any item Iโm quoting can have multiple materia, I obviously use a reference for that. Same with multiple manufacturing times.
Iโm able to create a virtual column that basically does the followingโฆ
This works great with virtual columns - I have a virtual column named โtotal_costโ. The moment I add a material, the virtual column updates, which is great.
However, I donโt want to just display the column โtotal_costโ. I want to save it so I can access this cost from other apps Iโm building. I have a column called โsaved_costโ with the app formula โ=[Total_Cost]โ. This works when you first are creating an item and adding materials and manufacturing times, but once you save that item, it locks the saved_cost. I can then add materials, manufacturing times, and delete them, and the virtual column โtotal_costโ gets updated, but the โsaved_costโ column doesnโt.
In order to get the saved cost to update it, I essentially have to click โeditโ on a quote, and then save. Because Iโm editing it, it updates โsaved_costโ with the virtual column value.
Is there a way around this? Iโm thinking one of two waysโฆ
Or is there an easier way to do this Iโm missing?
Thanks!
Hi @Greg_Huston,
As per my understanding, the second option you have listed above of creating an update action button for setting [Saved_Cost} real column with latest in VC [total_cost]) in parent table is workable approach.
This will be however a pure manual operation in that, whenever user adds child table records , after that she/he will need to tap the action in corresponding parent record.
However if the view is arranged such that the related child records are added/updated from the corresponding parentโs detail record, then overall operation will be user friendly.
There could of course be more efficient solutions.
Hi @Greg_Huston,Alternatively, an easier approach, if feasible for you,. You may wish to calculate the total cost value in your parent table by using spreadsheet formula just for that real total cost column ( and any similar aggregate column).
This approach will update the total cost in the parent table as soon as user saves the child table record.
Something similar has been done in Order Capture sample app. Please refer to Orders table Total Cost column
appsheet.com - Order Capture - An app for managing customers, products, and orders. Order Capture - An app for managing customers, products, and orders. appsheet.com
Check this sample app appsheet.com - EventAction - Created by Aleksi EventAction - Created by Aleksi appsheet.com
User | Count |
---|---|
32 | |
31 | |
30 | |
19 | |
16 |