AnsweredAssumed Answered

What is the difference between Sum(child::x) and child::SumOfX?

Question asked by Malcolm on Jul 24, 2012
Latest reply on Jul 24, 2012 by Malcolm

This is a technical question and I'm hoping to get some feedback from some of the engineers.

 

A typical invoice has a 1:N relationship between invoice and line items.

 

Let's say we have two fields in Line items, Cost and TotalCost, which a summary of Cost.

 

Invoices often have a few extra bits and pieces applied, like a discount, so it's necessary to bring total from the line items into the Invoices table. That can be got easily by two methods:

 

1. Sum(Line items::Cost)

2. Line items::TotalCost

 

My question is, what is the difference between these methods? They appear to produce the same result. Do they use the same methods and are they completely interchangeable or are there some esoteric conditions where one or the other is required?

 

Malcolm

Outcomes