Jump to content
  • 0

Calculate log entries in child table and submit total into parent table




I am trying to take multiple cost entries in a project cost log child table, total them up and insert the total into the parent field Total Project Cost. For example:

In child table:

Task 1- 1000

Task 2 - 200

Task 3 - 250

Total - 1450

Parent table:

Total Job Cost - (Have calculated (1450) entered here.

I was trying to figure out a way to pass the aggregated total from a tabular report as an external parameter into am Update Table Form but didn't see a way to do it.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
12 hours ago, MayMusic said:

You need to have a triggered action on your child table on Insert / Update to calculate the total Cost and add it to the parent table. https://howto.caspio.com/tables-and-views/triggered-actions/

May I tried to set up a trigger but i think i have it setup incorrectly because instead of summing all the submissions for all submission for a specific Job_ID into the parent table it is creating new single entries into the parent table1860910298_Screenshot(3).thumb.png.bc13b0b421fab83dde7814c16cfee9f5.png

Screenshot (2).png

Link to comment
Share on other sites

  • 0


Here is the example of the trigger you need:


The "New" block returns the sum of all new values and "Existing" block returns the sum of all existing values.
Case block within the "SET" part checks if the Existing sum is present.
If not, it throws "0" as the value.

You can find the application with this trigger  attached - TRIGGER_Update_Parent_Total_1_0_2019-Jun-12_0929.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...