Contents
Display Legacy Contents

 Print
    Sum      
This Function returns a <numeric>, which is the the result of the sum of all the values of the specified Column of a Table.

Parameters

Table <control>
  Source Table control.
   
Column numeric>
  Index of the column of the Table to sum the values from.

     
Example 1
  Example 1
Assuming that Table "Products" has a Column called "Stock" with index "3", with 3 records. Lets assume that the values for each record on that column are respectively: 200, 150 and 45.

Sum(CTRL(Products), 3)

Result = 395
  Assuming that Table "Products" has a Column called "Stock" with index "3", with 3 records. Lets assume that the values for each record on that column are respectively: "200", "150" and "EMPTY".

Sum(CTRL(Products), 3)

Result = 350

     
  • Regardless of the type pf the value in Column, it's always treated as a numeric. Therefore, if you try to execute this function over a Column filled with strings, each value will be converted to numeric before being added up to the result.

See also
Samples
Sample 1
Sample 2
 
Updated: 3/22/2013 4:14 PM