Sum

Kalipso - Form - Expressions - Functions - Functions Descriptions - Numeric Functions - 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.

Function available for the following operating systems:

Parameters

  • Table <control> - Source Table control.

  • Column <numeric> - Index of the column of the Table to sum the values from.

Examples

  • 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

  • Example 2

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.

Last updated