Crow Canyon Software Forum

Forum Navigation
Please or Register to create posts and topics.

Using the Sum function to add up numbers

I created a total field on the main list form and on the associated task form I'd like the task owners who complete each task, to indicate the amount in number format.  On completion, I wanted to add the task amount to the total amount on the main list form.  So, step 1 was to bring the total amount from main form to task form.  Step 2 I used the Sum function to add the amount and the total and store it in a separate field.  Step 3 I then replaced the total value on the main form with the summed up value.  However, to my dismay none of this worked.

Has anyone done something similar and would be willing to share how it was accomplished.

Thanx. - Anita.

Hi Anita,

Assuming that associated task list has a lookup to main list.

We can achieve this using a simple NITRO Workflow. Configure a workflow on on associated task list when 'an item is modified'.

Add below condition to the workflow. This it to make sure we are updating the main list item only when task is completed.

[Task Status] [equal] afterchange:Completed

Add "Update Item" action, choose "Lookup" in 'Item(s)' setting under general settings of action settings and select lookup column in the Lookup dropdown and then add below column mapping.

Total amount on main list = $add([Amount|Amount],[Related Ticket ID::TotalAmount|RelatedTicketID::TotalAmount])

In this example,
"Amount" is number column on associated tasks list
"Related Ticket ID" is a lookup column in associated tasks list pointing to main list
"TotalAmount" is number column on main list (default value of this column is zero)

Hi,

We have tried this solution a number of different ways, but the main list form field (TotalAmount) does not get updated.  We have used sum as well as the add functions and that field just does not want to update.  Anything else we should try?

I understand our support team worked with you on this issue, and when we put the default value of the TotalAmount to zero (0) rather than null, the calculation worked. If you have further questions on this, please let us know.