Sum of all the numbers in an array. The return type depends on the
type of the array. For example, for an array of type Double, the
return type is a double value.
Supported data type
The SUM function supports the following data types:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-26 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eSUM\u003c/code\u003e function adds all values within an array, such as an array of double or integer data types.\u003c/p\u003e\n"],["\u003cp\u003eThe return type of the \u003ccode\u003eSUM\u003c/code\u003e function depends on the array's data type, returning a double for a double array and an integer for an integer array.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSUM\u003c/code\u003e function is called using the array variable, followed by ".SUM()"; for example, \u003ccode\u003e$var1$.SUM()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eApplication Integration's supported connectors are documented in the provided link.\u003c/p\u003e\n"]]],[],null,["# SUM function\n\nSee the [supported connectors](/integration-connectors/docs/connector-reference-overview) for Application Integration.\n\nSUM function\n============\n\n`SUM` function\n--------------\n\nSupported data type\n-------------------\n\n\nThe `SUM` function supports the following data types:\n\n- Double array\n- Integer array\n\nExample: Add all the values of an integer array\n-----------------------------------------------\n\n\n**Sample data** : `$var1$ = {5,8,2,1}`\n\n\n**Usage** : `$var1$.SUM()`\nAdd all the values in var1.\n\n\n**Output** : `16`\n\nRecommendation\n--------------\n\n- Learn how to add and configure a [Data Mapping task](/application-integration/docs/configure-data-mapping-task)"]]