control.sumByXmlNode()
- Last UpdatedJun 25, 2024
- 1 minute read
Use sumByXmlNode() method to get the sum of the value of all controls with a specific XML node on the form.
Syntax
// N1 is a Number object.
nRetVal = control.findById("N1").sumByXmlNode();
Parameters
None.
Return Value
This method returns a numeric value.
Example
// Define a variable and get the sum of the value of all controls with a specific XML node.
var sum = control.findByXmlNode("Amount").sumByXmlNode();
// Add all Number controls in the same and lower hierarchy on the form.
control.findById("N1").sumByXmlNode("Amount");
// Add all Number controls anywhere on the form.
control.findById("N1").sumByXmlNode("Amount",1);
// Add all Number controls in the same hierarchy on the form.
control.findById("N1").sumByXmlNode("Amount",2);