How to Create a String Formula Field in Zoho CRM

Permission Required
Users with the Field-level Access permission in profile can access this feature.

Create String Formula Field

The following table helps you to understand the type of arguments required for formula functions along with the type of syntax that needs to be formed.

Function
Description
Usage
Examples 
LenReturns the number of characters in a specified text string.Len(string)Len('abc') returns 3; Len(' abc ') returns 5
FindReturns the nth occurrence of the text string.Find('string','search string',number)Find('greenery','n',1) returns 5
ConcatReturns the concatenation of all the strings.Concat('string','string',...)Concat('FirstName',' ','LastName') returns FirstName LastName
ContainsReturns true if search string is found in the other string, otherwise returns false.Contains('string','search string')Contains('abcdef','cd') returns true
StartswithReturns true if the string begins with the search string, otherwise returns false.Startswith('string','search string')Startswith('abcdef','cd') returns false , Startswith('abcdef','abc') returns true
EndswithReturns true if the string ends with the search string, otherwise returns false.Endswith('string','search string')Endswith('abcdef','ab') returns false Endswith('abcdef','ef') returns true
LowerConverts all characters in a string to lower case.Lower('string')Lower('APPLES') returns "apples" Lower('Apples') returns "apples"
UpperConverts all characters in a string to upper case.Upper('string')Upper('apples') returns "APPLES" Upper('APPles') returns "APPLES"
TrimReturns string with the leading and trailing white space characters removed.Trim('string')Trim(' abcd ') returns "abcd"
SubstringReturns a portion of an input string, from a start position in the string to the specified length.Substring('string',n1,n2)Substring('abcdefg',4,7) returns "defg"
ReplaceReplaces each occurrence of the search string in the input string with the corresponding replace string.Replace('string','search string','replace string')Replace('abcdefg','abc','xyz') returns "xyzdefg"
TostringConverts any argument to a string data type.Tostring(generic argument)Tostring(3.4) returns "3.4" Tostring('') returns < empty >
CaseInsensitiveEquals Compares two strings in case insensitive manner.CaseInsensitiveEquals(string,string)CaseInsensitiveEquals('asdf','AsDf') gives result as true; CaseInsensitiveEquals('asdf','AsDg')gives result as false
IsEmptyChecks whether the value is empty or not.IsEmpty(generic)IsEmpty('') gives result as true; IsEmpty('asdf') gives result as false; IsEmpty(${Customer.Score}) gives result as true if Score is not entered.
DateBetweenReturns the time between two dates where the unit can be years, months, weeks, days, hours,  minutes.DateBetween(date-time,date-time,string)DateBetween(Newdate(2022,02,10,11,30,'AM'), Newdate(2023,02,19,11,30,'AM'),'years') gives result as 1

Note

  • The string constants should always be enclosed in single quotes(‘)
  • Field labels do not need to be enclosed in single quotes (‘).
  • Values of the String data type can be used with == and != operations inside If(), Or(), And(), and Not() library functions.
    For example, If (‘abc’ == ‘abc’, ${returnValue1}, ${returnvalue2})
To create String type formula fields
  1. Log in to Zoho CRM with Administrator privileges.
  2. Go to Setup > Customization > Modules and Fields. Module refers to the Leads, Accounts, Contacts, etc. tabs.
  3. Click the required module. The Layout Editor opens.
  4. Drag and drop the Formula field from the New Fields tray to the required module section on the right.
  5. In the Formula Properties window, do the following:
    • Enter id in the Label field. Select String as the Formula Return Type from the drop-down list.
    • Constructing Formulas
  6. Under Select Functions, select String Functions from the drop-down list.
  7. From the list of String Functions, choose a function and click Insert. (Alternatively, you can double-click on a function to insert)
  8. In the Formula expression, click between the parenthesis to insert an argument.
  9. Under Select Field column, choose a field and click Insert. (Alternatively, you can double-click on a field to insert) Under Select Operator column, choose an operator and click Insert.
  10. Click Check Syntax to check the construction of the formula.
  11. Click Save.