The SUM function is one of the most widely used functions in SharpCloud, it has a wide range of applications and is used to simply add an array of numbers together.
Syntax
SUM([x,x,x,x,x,x])
Parameters
x = Values that will be added together.
Data Type Returned
SUM will return a number.
Examples
SUM([2,3,4,1,6]) will return 16
Using the SUM function in conjunction with the RELATEDITEMS and GETITEMVALUES functions to discover the sum of all the “Costs” of related projects.
SUM(GETITEMVALUES(RELATEDITEMS(), ‘Cost’)) will return the sum of the cost of all related items.