I am completely new to Zoho Creator. Using the SUM documentation below, I attempted to use a formula field to sum a single numeric field in a sub-form. I could never get it to work. I then tried with all fields in a db with only one form. Still no go, and I got the same errors.
Should sum() work in the Expression property of a Formula field? If not, where do I use it to get a total for a field? If the sum function is not the way to go, what is?
Here are results of various entries in Expression property
Form - TestForm
Numeric Field - NumberIn
Formula Field - SumNumberIn
1 Numberin Works, but of course it only shows each record's value, not a total
2 sum(NumberIn) "Not able to find 'sum' function"
3 Testform.sum(NumberIn) and SumNumberIn = Testform.sum(NumberIn) "Expression not supported in formula"
Sum Function
//to sum the total value of a numeric field in the form
<variable> = <Form_Name>.sum(<Numeric Field Name>);
//to sum specific records with a given criteria
<variable> = <Form_Name>[criteria expression].sum(<Numeric Field Name>);
where,
<variable> refers to a user defined variable name or a form field.
Example:
//to find total sales value
Total_Sales = FormA.sum(Amount);
//to find the total sales value for Item="Printer"
ItemA = FormA[Item == "Printer"].sum(Amount);