/

Functions Library

Zoho ERP provides a built-in functions library that includes mathematical, text, and logical functions. You can use these functions in the Formula data type and in HTML PDF Templates for custom modules.

Note: The functions library includes preset functions that are built into Zoho ERP. These functions are different from custom functions written using Deluge for automation.

Each function in the library includes the following elements:

  • Function Name: The predefined name of the function followed by parentheses. For example: ABS() or CEILING().
  • Arguments: The values that you enter inside the parentheses. Arguments can be numbers, text, fields, or other functions.
  • Operators: The symbols that help the function evaluate a calculation or condition. For example: IF(2==2, 1, 0).

Mathematical Functions

Mathematical functions help you perform numeric calculations.

Function NameDescriptionSyntaxExamples
AbsReturns the absolute value of a number.ABS(number)ABS(-42) returns 42.
AddmonthsAdds or subtracts months from a date and returns the new date.ADDMONTHS(date, number)ADDMONTHS(“2022-10-17”, 3) returns 2023-01-17.
AvgReturns the average value of the given numbers.AVG(number1, number2, …, number30)AVG(1, 2, 3) returns 2.
CeilingRounds a number up to the nearest integer.CEILING(number)CEILING(3.4) returns 4.
DateCombines year, month, and day values and returns a date.DATE(year, month, day)DATE(2022, 10, 17) returns 2022/10/17.
FloorRounds a number down to the nearest integer.FLOOR(number)FLOOR(3.8) returns 3.
MaxReturns the largest of the given numbers.MAX(number1, number2, …, number30)MAX(3, 1, 5, 2) returns 5.
MinReturns the smallest of the given numbers.MIN(number1, number2, …, number30)MIN(5, -3, 0, 1) returns -3.
PercentageReturns what percentage number2 is of number1.PERCENTAGE(number1, number2)PERCENTAGE(20, 5) returns 25.
ProductMultiplies the given numbers.PRODUCT(number1, number2, …, number30)PRODUCT(5, 6) returns 30.
RoundRounds a number to the specified number of decimal places.ROUND(number, decimal_place)ROUND(123.344, 2) returns 123.34.
SeriesGenerates a sequence of numbers from start to end with an optional step.SERIES(number, number, number)SERIES(2, 10, 2) returns 2, 4, 6, 8, 10.
SumReturns the sum of the given numbers.SUM(number1, number2, …, number30)SUM(3, 8, 5) returns 16.
SqrtReturns the square root of the given number.SQRT(number)SQRT(9) returns 3.

Note: You can use default Zoho ERP fields or custom fields as arguments. You can also nest functions inside other functions.

Function NameNo. of Arguments RequiredArgument Data TypeOutput Data Type
Abs1NumberNumber, String
Addmonths2String, NumberDate, String
AvgMultipleAll NumberNumber, String
Ceiling1NumberNumber, String
Date3Number, Number, NumberDate, String
Floor1NumberNumber, String
MaxMultipleAll NumberNumber, String
MinMultipleAll NumberNumber, String
Percentage2Number, NumberNumber, String
ProductMultipleAll NumberNumber, String
Round2Number, NumberNumber, String
Series3Number, Number, NumberNumber, String
SumMultipleAll NumberNumber, String
Sqrt1NumberNumber, String

Insight: When the output data type is String, it refers to the Text Box (Single Line) custom field.

Text Functions

Text functions help you manipulate and format text.

Function NameDescriptionSyntaxExamples
CharReturns the character for the given ASCII code.CHAR(number)CHAR(97) returns a.
CleanRemoves non-printable characters from text.CLEAN(string)CLEAN(“H¶ello”) returns Hello.
CodeReturns the ASCII code of the first character in the string.CODE(string)CODE(“Apple”) returns 65.
ConcatenateCombines two strings into a single string.CONCATENATE(string1, string2)CONCATENATE(“First”, “Name”) returns FirstName.
ExactReturns true if two strings are identical.EXACT(string1, string2)EXACT(“Zoho”, “Zoho”) returns true.
FixedRounds a number to a specified number of decimals and formats the output.FIXED(number, decimal_places(optional), no_commas(optional))FIXED(12345678.4367, 3, FALSE) returns 12,345,678.437.
MidReturns characters from the middle of a string.MID(string, starting_position, number_of_characters)MID(“welcome”, 4, 4) returns come.
LeftReturns the specified number of characters from the left side of a string.LEFT(string, number)LEFT(“Apple”, 3) returns App.
LenReturns the number of characters in a string.LEN(string)LEN(“abc”) returns 3.
LowerConverts text to lower case.LOWER(string)LOWER(APPLES) returns apples.
ProperConverts the first letter of each word to upper case.PROPER(string)PROPER(zoho erp) returns Zoho Erp.
RightReturns the specified number of characters from the right side of a string.RIGHT(string, number_of_characters)RIGHT(“Zoho ERP”, 3) returns ERP.
ReptRepeats a value a specified number of times.REPT(value, number)REPT(“A”, 6) returns AAAAAA.
ReplaceReplaces part of a string with different text.REPLACE(old_text, starting_number, number_of_characters, new_text)REPLACE(“South Africa”, 1, 5, “North”) returns North Africa.
SearchReturns the position of the first occurrence of one string inside another.SEARCH(string1, string2, number(optional))SEARCH(“Elephant”, “e”, 2) returns 3.
SubstituteReplaces the specified text in a string.SUBSTITUTE(string, old_text, new_text, instance_of_occurrence(optional))SUBSTITUTE(“Dog in the wall”, “Dog”, “Cat”) returns Cat in the wall.
UpperConverts text to upper case.UPPER(string)UPPER(apples) returns APPLES.
TReturns the value if it is text.T(string)T(“India”) returns India.
TrimRemoves leading and trailing spaces from text.TRIM(string)TRIM(" abcd “) returns abcd.

Note: In the FIXED() function, decimal_places and no_commas are optional. You can also nest text functions.

Function NameNo. of Arguments RequiredArgument Data TypeOutput Data Type
Char1NumberString
Clean1StringString
Code1StringNumber
Concatenate2String, StringString
Exact2String, StringBoolean
Fixed3Number, Number, BooleanNumber
Mid3String, Number, NumberString
Left2String, NumberString
Len1StringNumber
Lower1StringString
Proper1StringString
Right2String, NumberString
Rept2String, NumberString
Replace4String, Number, Number, StringString
Search3String, Value, NumberNumber
Substitute4String, String, String, NumberString
Upper1StringString
T1StringString
Trim1StringString

Logical Functions

Logical functions help you evaluate conditions and return true or false.

Function NameDescriptionSyntaxExamples
AndReturns true only if all conditions are true.AND(condition1, condition2, …, condition30)AND(2>1, 5>3, 7<8) returns true.
CountReturns the count of numeric values among the given values.COUNT(value1, value2, …, value30)COUNT(10, 11.5, “string”, -55, “25”) returns 3.
IfReturns one value when the condition is true and another when it is false.IF(condition, value1, value2)IF(8>7, 1, 0) returns 1.
IsblankReturns true if the value is empty.ISBLANK(value)ISBLANK() returns true.
IsnumberReturns true if the value is a number.ISNUMBER(value)ISNUMBER(25) returns true.
NotReturns the opposite of a condition.NOT(condition)NOT(1==1) returns false.
OrReturns true if any one of the conditions is true.OR(condition1, condition2, …, condition30)OR(1<2, 3>5, 7>8) returns true.

Note: You can use default Zoho ERP fields or custom fields as arguments in logical functions.

Function NameNo. of Arguments RequiredArgument Data TypeReturn Type
AndMultipleBooleanBoolean
CountMultipleGenericBoolean
If3GenericBoolean
Isblank1GenericBoolean
Isnumber1GenericBoolean
Not1BooleanBoolean
OrMultipleBooleanBoolean

Insight: Generic means any data type, such as numeric, string, or boolean.