Join us in the Zoho Extensions Development Bootcamp scheduled across cities in India Register Now

Skip to product menu
close
  • Recent Launches
    Press Space or Enter to display list of options
EXPLORE ALL PRODUCTS

Recent Launches

New

Easy domain registration, transfer, and secured DNS management.

Try now
New

Payroll software with automated tax payments and filing.

Try now
New

Low-code IoT platform and solutions for connected businesses.

Try now
New

Business formation service to launch and grow your businesses.

Try now
New

Unified payment solution built for all businesses.

Try now
New

Comprehensive email security and archiving for every business.

Try now
Suites

Cloud-based qualitative data analysis tool.

Try now
New

Online community platform for individuals and businesses to grow their network and brand.

Try now
New

Modern retail POS to sell better, manage your entire business, and join the digital revolution.

Try now
SuitesNew

Unified project management platform for intelligent, data-driven work.

Try now
Suites

Unified platform for customer service and support teams.

Try now

Sales

CRM

Comprehensive CRM platform for customer-facing teams.

CRM
Voice

Cloud Contact Center Software for businesses.

Voice
Sign

Digital signature app for businesses.

Sign
Forms

Build online forms for every business need.

Forms
Bigin

Simple CRM for small businesses moving from spreadsheets.

Bigin
SalesIQ

Live chat app to engage and convert website visitors.

SalesIQ
Bookings

Appointment scheduling app for consultations with customers.

Bookings
RouteIQ

Comprehensive sales map visualization and optimal route planning solution.

RouteIQ
Thrive

Complete loyalty and affiliate management platform.

Thrive
Suites
CRM Plus

Unified platform to deliver top-notch customer experience.

CRM Plus

Marketing

Campaigns

Create, send, and track targeted email campaigns that drive sales.

Campaigns
Voice

Cloud Contact Center Software for businesses.

Voice
Sign

Digital signature app for businesses.

Sign
Forms

Build online forms for every business need.

Forms
Social

All-in-one social media management software.

Social
Survey

Design surveys to reach and interact with your audience.

Survey
SalesIQ

Live chat app to engage and convert website visitors.

SalesIQ
Sites

Online website builder with extensive customisation options.

Sites
Backstage

End-to-end event management software.

Backstage
PageSense

Website conversion optimization and personalisation platform.

PageSense
Marketing Automation

All-in-one marketing automation software.

Marketing Automation
LandingPage

Smart landing page builder to increase conversion rates

LandingPage
Webinar

Webinar platform for webcasting online webinars.

Webinar
NEW
LeadChain

Sync, manage, and convert leads across channels seamlessly.

LeadChain
NEW
Domains

Easy domain registration, transfer, and secured DNS management.

Domains
NEW
CommunitySpaces

Online community platform for individuals and businesses to grow their network and brand.

CommunitySpaces
Thrive

Complete loyalty and affiliate management platform.

Thrive
Publish

Manage all your local business listings on a single platform.

Publish
Suites
Marketing Plus

Unified marketing platform for marketing teams.

Marketing Plus

Commerce and POS

Commerce

eCommerce platform to manage and market your online store.

Commerce

Service

Desk

Helpdesk software to deliver great customer support.

Desk
Assist

Remote support and unattended remote access software.

Assist
Voice

Cloud Contact Center Software for businesses.

Voice
SalesIQ

Live chat app to engage and convert website visitors.

SalesIQ
Bookings

Appointment scheduling app for consultations with customers.

Bookings
FSM

End-to-end field service management platform for service businesses.

FSM
Lens

Interactive remote assistance software with augmented reality.

Lens
Solo

The all-in-one toolkit for solopreneurs.

Solo
Suites
Service Plus

Unified platform for customer service and support teams.

Service Plus

Finance

Books

Powerful accounting platform for growing businesses.

Books
Expense

Effortless expense reporting platform.

Expense
Sign

Digital signature app for businesses.

Sign
Inventory

Powerful stock management and inventory control software.

Inventory
FREE
Invoice

100% Free invoicing solution.

Invoice
Billing

End-to-end billing solution for your business.

Billing
NEW
Payroll

Payroll software with automated tax payments and filing.

Payroll
Commerce

eCommerce platform to manage and market your online store.

Commerce
Checkout

Collect payments online with custom branded pages.

Checkout
Practice

Practice management software for accounting firms.

Practice
Solo

The all-in-one toolkit for solopreneurs.

Solo
NEW
Payments

Unified payment solution built for all businesses.

Payments
Suites
Finance Plus

All-in-one suite to manage your operations and finances.

Finance Plus

Email, Storage, and Collaboration

Mail

Secure email service for teams of all sizes.

Mail
Voice

Cloud Contact Center Software for businesses.

Voice
Sign

Digital signature app for businesses.

Sign
WorkDrive

Online file management for teams.

WorkDrive
Bookings

Appointment scheduling app for consultations with customers.

Bookings
Cliq

Stay in touch with teams no matter where you are.

Cliq
Notebook

Beautiful home for all your notes.

Notebook
Meeting

Online meeting software for all your video conferencing & webinar needs.

Meeting
Connect

Employee experience platform to communicate, engage, and build positive employee relations.

Connect
Learn

Knowledge and learning management platform.

Learn
Office Integrator

Built in document editors for web apps.

Office Integrator
Writer

Word processor for focused writing and discussions.

Writer
TeamInbox

Shared inboxes for teams.

TeamInbox
ZeptoMail

Secure and reliable transactional email sending service.

ZeptoMail
Show

Create, edit, and share slides with a sleek presentation app.

Show
Tables

Work management tool to connect people, processes, and information.

Tables
Sheet

Spreadsheet software for collaborative teams.

Sheet
Office Suite

Powerful collaborative work platform for teams.

Office Suite
Calendar

Online business calendar to manage events and schedule appointments.

Calendar
ToDo

Collaborative task management for individuals and teams.

ToDo
FREE
PDF Editor

Collaborative online PDF editing tool.

PDF Editor
Suites
Workplace

Application suite built to improve team productivity and collaboration.

Workplace

Human Resources

Expense

Effortless expense reporting platform.

Expense
Recruit

Intuitive recruiting platform built to provide hiring solutions.

Recruit
People

Organize, automate, and simplify your HR processes.

People
Sign

Digital signature app for businesses.

Sign
NEW
Payroll

Payroll software with automated tax payments and filing.

Payroll
Shifts

Employee scheduling and time tracking app.

Shifts
Workerly

Manage temporary staffing with an employee scheduling solution.

Workerly
Suites
People Plus

Comprehensive HR platform for seamless employee experiences.

People Plus

Security and IT Management

Creator

Build custom apps to simplify business processes.

Creator
Assist

Remote support and unattended remote access software.

Assist
Vault

Online password manager for teams.

Vault
Directory

Workforce identity and access management solution for cloud businesses.

Directory
Lens

Interactive remote assistance software with augmented reality.

Lens
QEngine

Test automation software to build, manage, execute, and report testcases.

QEngine
Catalyst

Pro-code platform to build and deploy your apps.

Catalyst
RPA

Automate manual, tedious, and repetitive tasks easily.

RPA
NEW
eProtect

Comprehensive email security and archiving for every business.

eProtect
FREE
OneAuth

Secure multi-factor authenticator (MFA) for all your online accounts.

OneAuth
Toolkit

Complete resource for any admin-related lookup queries.

Toolkit

BI and Analytics

Analytics

Modern self-service BI and analytics platform.

Analytics
DataPrep

AI-powered data preparation service for your data-driven organization.

DataPrep
NEW
IoT

Harnessing IoT analytics for real-time operational intelligence.

IoT
Embedded BI

Embedded analytics and white label BI solutions, tailored for your needs.

Embedded BI

Project Management

Projects

Manage, track, and collaborate on projects with teams.

Projects
Sprints

Planning and tracking tool for scrum teams.

Sprints
BugTracker

Automatic bug tracking software for managing bugs.

BugTracker
Solo

The all-in-one toolkit for solopreneurs.

Solo
Suites
Projects Plus

Unified project management platform for intelligent, data-driven work.

Projects Plus

Developer Platforms

Creator

Build custom apps to simplify business processes.

Creator
Flow

Automate business workflows by creating smart integrations.

Flow
Office Integrator

Built in document editors for web apps.

Office Integrator
DataPrep

AI-powered data preparation service for your data-driven organization.

DataPrep
ZeptoMail

Secure and reliable transactional email sending service.

ZeptoMail
Tables

Work management tool to connect people, processes, and information.

Tables
QEngine

Test automation software to build, manage, execute, and report testcases.

QEngine
Catalyst

Pro-code platform to build and deploy your apps.

Catalyst
RPA

Automate manual, tedious, and repetitive tasks easily.

RPA
NEW
IoT

Build, deploy, and scale IoT solutions for connected businesses.

IoT
Apptics

Application analytics for all apps.

Apptics
Embedded BI

Embedded analytics and white label BI solutions, tailored for your needs.

Embedded BI

IoT

NEW
IoT

Low-code IoT platform and solutions for connected businesses.

IoT

Search Result

CRM Plus

Unified platform to deliver top-notch customer experience.

Try now
CRM Plus
Service Plus

Unified platform for customer service and support teams.

Try now
Service Plus
Finance Plus

All-in-one suite to manage your operations and finances.

Try now
Finance Plus
People Plus

Comprehensive HR platform for seamless employee experiences.

Try now
People Plus
Workplace

Application suite built to improve team productivity and collaboration.

Try now
Workplace
Marketing Plus

Unified marketing platform for marketing teams.

Try now
Marketing Plus
Projects Plus

Unified project management platform for intelligent, data-driven work.

Try now
Projects Plus
All-in-one suite

Zoho One

The Operating System for Business

Run your entire business on Zoho with our unified cloud software, designed to help you break down silos between departments and increase organizational efficiency.

TRY ZOHO ONE
Zoho Marketplace

With over 2000 ready-to-use extensions across 40+ categories, connect your favorite business tools with the Zoho products you already use.

EXPLORE MARKETPLACE
Skip to main content

Built-in Functions

A function is a set of code, that takes a finite number of input and optionally returns a value.

 String functions

Functions that operate on string expression are classified as string functions, they include functions for finding the length of a given text, remove certain words from a text etc.

In all the given functions, the original string is not changed by the functions, whereas only the return value is affected by these functions.

OperatoFormat**Description
+<string1> + <string2>Concatenate two strings
contains(<string>)<string1>.contains(<string2>)Returns :boolean
Returns true if string2 is a substring of string1
endsWith(<string>)<string1>.endsWith(<string2>)Returns :boolean
Returns true if string1 ends with string2
startsWith(<string>)<string1>.startsWith(<string2>)Returns :boolean
Returns true if string1 starts with string2
remove(<string>)<string>.remove(<substring>)Eliminate the substring
from the given string.
removeFirstOccurence()<string>.removeFirst
Occurence(<substring>)
Eliminate the first occurence of the substring
from the given string.
removeLastOccurence()<string>.removeLast
Occurence(<substring>)
Eliminate the last occurence of the substring
from the given string.
getSuffix()<string>.getSuffix(<substring>)Get the string after the specified substring.
getPrefix()<string>.getPrefix(<substring>)Get the string before the specified substring.
toUpperCase()<string>.toUpperCase()Convert the string to uppercase.
toLowerCase()<string>.toLowerCase()Convert the string to lowercase.
getAlphaNumeric()<string>.getAlphaNumeric()Retain only the alphanumeric present in the
specified string.
getAlpha()<string>.getAlpha()Retain only the alphabets present in the
specified string.
removeAllAlphaNumeric()<string>.removeAll
AlphaNumeric()
Remove all the alphanumeric present in the
specified string.
removeAllAlpha()<string>.removeAllAlpha()Remove all the alphabets present in the
specified string.
length()<string>.length()Get the length of the given string.
getOccurenceCount()<string>.getOccurence
Count(<substring>)
Gets the number of times a substring is
present in the given string.
indexOf()<string>.indexOf(<substring>)Gets the index of the first occurence of
the substring in the given string.
lastIndexOf()<string>.lastIndexOf(<substring>)Gets the index of the last occurence of the
substring in the given string.
substring(<s.index>, <e.index>)<string1>.substring(<
s.index>, <e.index>)
Returns the substring from the specified
startindex to the endindex. The startindex
and endindex values are base zero specifications
(i.e) you reference the positions within the main
string starting with zero , the second position
in the string is 1, the third is 2 etc..

- startindex value is the position of the first
character in the main String to be extracted to the
SubString.

- endindex value is the position of character in the
main String where you stop extracting to the SubString
and NOT the position of the last character in the main
string to be extracted to the SubString.
trim()<string>.trim()Removes any leading and trailing space
from a string
equalsIgnoreCase
(<string>)
<string1>.equalsIgnoreCase
<string2>
Returns true if <string1> equals <string2>
toString()<expression>.toStringConverts any type of expression to string.
Refer  the behavior of toString() when applied to date/time
value.
matches()<string expression>.matches
(<regular expression>)
returns true if the given string
matches regular expression given as argument.
Ex:
  1. phone = "(123) 456 7890";
  2. if(phone.matches("^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$") == false)
  3. {
  4. Info "Please enter a valid Phone format";
  5. }
 replaceAll(searchString,
replacementString, [escapeRegEx])
<String>.replaceAll
(<searchString>,
<replacementString>
,false)
Replaces all occurrence of the string that matches the given <searchString> expression with the given <replacementString>.

Examples:


searchVariable="Jack and Jill went up the hill to fetch
a pail of water";
searchString="Jack";
replacementString="Bill";
resultVariable = sourceVariable.
ReplaceAll(searchString,replacementString);
//returns "Bill and Jill went up the hill
to fetch a pail of water"


input.Address = "Suite 123, 4523 Yonge
Street, Toronto";
input.Address = input.Address.replaceAll("23","9945");
//returns "Suite 19945, 459945 Yonge Street, Toronto"

By default, the replaceAll() function
supports regular expression (i.e) it will not
find and replace the special characters like $,* etc.,
in the source string.

The parameter [escapeRegEx] is an optional
boolean parameter provided to specify if the regular
expression is to be supported or escaped by Zoho Creator,
while executing the replaceAll() function.
  • The value true denotes escaping the regular
    expression support on replace functions.
  • The value false denotes supporting regular expression
    on replace functions. By default, the value is
    taken as "false".
Note: If the value for escapeRegEx parameter is not
specified, the value we will take as " false".
i.e By default, regular expression is supported on replace
functions. For example, the following two functions will
perform the same operation:

replaceAll("OnlineLine DB","Creator",false)
replaceAll("OnlineLine DB","Creator")

replaceFirst(searchString,
replacementString,[escapeRegEx])
<String>.replaceFirst
(<searchString>,
<replacementString>,
false)
Replaces the first occurrence of the string
that matches the given <searchString>
expression with the given <replacementString>.

By default, the replaceFirst function
supports regular expression (i.e) it will not
find and replace the special characters like $,* etc., in the
source string.

The parameter [escapeRegEx] is an optional boolean parameter provided to specify if the regular
expression is to be supported or escaped by Zoho Creator,
while executing the replaceFirst() function.
  • The value true denotes escaping the regular expression
    support on replace functions.
  • The value false denotes supporting regular expression
    on replace functions. By default, the value is taken as "false".
Note: If the value for escapeRegEx parameter is not
specified, the value we will take as " false".

Note:

  • In the above table, <string>,<string1>,<string2>, <substring> are all <string expression>
  •  Behavior of toString()when applied to datetime value:
    • <date/datetime>.toString() function on date/datetime will output date string in the format specified in the application setting.
    • If you want to override it, you can use <date/datetime>.toString("date format as string"). eg. toString("dd-MM-yyyy")
    • If you wish convert to string in different timezone, you can use <date/datetime>.toString("date format as string","<Time Zoho>"). eg. toString("dd-MM-yyyy","Asia/Calcutta")
  • The Date and Time pattern strings are mentioned below,
    • Date - dd
    • Month - MM (or) MMM (or) MMMM
    • Year - yy (or) yyyy
    • 12 hour format - hh
    • 24 hour format - HH
    • minute - mm
    • second - ss
    • AM/PM marker - a

 Numeric Functions

Functions that operate on numeric values are classified as numeric functions:

In all the given functions, the original number is not changed by the functions, whereas only the return value is affected by these functions.

OperatorFormatDescription
sin()Format :<numeric>.sin()
Returns :numeric
Returns the trigonometric sine of the given angle
sqrt()Format :<numeric>.sqrt()
Returns :numeric
Returns the correctly rounded positive square root of the given value
tan()Format :<numeric>.tan()
Returns :numeric
Returns the trigonometric tangent of an angle.
toDecimal()Format :<expression>.toDecimal()
Returns :Decimal
Returns Decimal from given expression.
toLong()Format :<expression>.toLong()
Returns :numeric
Returns Long from given expression. The hexadecimal string should be preceded by '0x'. Eg "0x1F".toLong() returns hexadecimal value of '1F'.
round()Format:<numeric>.round(<precision-numeric>)Returns the number after rounding off to the specified number of digits.
log()Format:<numeric>.log()Returns the logarithmic value (LogeN) of the specified number.

 Boolean string functions

These functions operate on two string expression and return a boolean expression.

OperatorUsageReturns true when
==<string1> == <string2>two string expressions are equal
contains()<string1>.contains(<string2>)string2 is a substring of string1
startsWith()<string1>.startsWith(<string2>)string1 starts with string2
endsWith()<string1>.endsWith(<string2>)string1 ends with string2

 Date Functions

OperatorFormatReturns
getDay()<date>.getDay()
where, <date> is a form field of type "date"
returns a number in the range (1 - 31), representing the number of the day of the month on which the date occurs.
getMonth()<date>.getMonth()
where, <date> is a form field of type "date"
returns a number in the range (1 -12), representing the number of the month of the year, on which the date occurs
getYear()<date>.getYear()
where, <date> is a form field of type "date"
returns a number representing the year of the date.
getWeekOfYear()<date>.getWeekOfYear()
where, <date> is a form field of type "date"
returns a number in the range (1 - 52), representing the number of the week in the year. For example, "16/1/2007" returns 3.
getDayOfWeek()<date>.getDayOfWeek()
where, <date> is a form field of type "date"
returns a number in the range (1 - 7), representing the number of the day of the week, that date falls. The number "1" represents Sunday, "2" represents Monday and so on.
getDayOfYear()<date>.getDayOfYear()
where, <date> is a form field of type "date"
return a number in the range 1-365, representing the number of the day of the year that date falls.
addDay()<date/time>.addDay(<numeric>)Returns a Date, after adding the specified number of day(s)
addMonth()<date/time>.addMonth(<numeric>)Returns a Date, after adding the specified number of month(s)
addWeek()<date/time>.addWeek (<numeric>)Returns a Date, after adding the specified number of week(s).
addYear()<date/time>.addYear(<numeric>)Returns a Date,after adding the specified number of year(s).
subDay()<date/time>.subDay(<numeric>)Returns a Date, after subtracting the specified number of day(s).
subMonth()<date/time>.subMonth(<numeric>)Returns a Date, after subtracting the specified number of ,month(s).
subWeek()<date/time>.subWeek(<numeric>)Returns a Date, after subtracting the specified number of week(s).
subYear()<date/time>.subYear(<numeric>)Returns a Date, after subtracting the specified number of year(s)
toDate()<string>.toDate()<string>.toDate() function will always parse the input string using the format specified in the application setting and will throw an error if it cannot convert the string to date. If you want to override it, you can use <string>.toDate("date format as string").
eg: toDate("dd-MM-yyyy")
toTime()<string>.toTime() <string>.toTime() function will always parse the input string using the format specified in the application setting and will throw an error if it cannot convert the string to date-time.
endsIf you want to override it, you can use <string>.toTime("date format as string"). eg: toTime("dd-MM-yyyy")

 Time functions

OperatorFormatReturns
addHour()<date-time>.addHour(<numeric>)Returns a Date, after adding the specified number of hour(s).
addMinutes()<date-time>.addMinutes(<numeric>)Returns a Date, after adding the specified number of minute(s).
addSeconds()<date-time>.addSeconds(<numeric>)Returns a Date, after adding the specified number of second(s).
getHour()<date-time>.getHour()Returns the hour of the day
getMinutes()<date-time>.getMinutes()Returns the minutes of the hour
getSeconds()<date-time>.getSeconds()Returns the Seconds of the minute
subHour()<date-time>.subHour(<numeric>)Returns a Date, after subtracting the specified number of hour(s).
subMinutes()<date-time>.subMinutes(<numeric>)Returns a Date, after subtracting the specified number of minute(s).
subSeconds()<date-time>.subSeconds(<numeric>)Returns a Date, after subtracting the specified number of second(s).

 List Functions

OperatorFormatReturns
contains()<list>.contains(<element>)Returns :boolean
returns 'true' if the element is present in the list
get()<list>.get(<index>)Returns: element
returns the element at the specified postion (first element will be at index '0')
indexOf()<list>.indexOf(<element>)Returns :numeric
returns the position of the given element in list (first element's position is '0')
lastIndexOf()<list>.lastIndexOf(<element>)Returns the position of the last occurence of the element in the list.
remove()<list>.remove(<index>)remove and return the element at the specified index (first element's index is '0')
sort()<list>.sort(<optional boolean>)Returns: list
returns the list in the sorted order. The optional boolean specifies ascending(true)/descending(false)
size()<list>.size()Returns the number of elements in the list.
isempty()<list>.isempty()Returns :boolean
returns 'true' if the list is empty (else 'false')
sublist()<list>.sublist(<start index>,<optional endIndex>)Returns: list
returns the sublist of the given list starting from the given start index to the specied end index (to the end of the list, if endIndex not given)
toList()<string>.toList(<optional separator>)Returns: list
converts the string to list using the given separator(default separator is ',' (comma))
{}{<optional comma separated elements>}Returns: list
Create a list with the given elements. Creates empty list if no element is given.
List()List()Returns: list
Create an empty list.
List:String()List:String()Returns: list
Create an empty string list. This list can hold only string elements
List:Int()List:Int()Returns: list
Create an empty integer list.This list can hold only integer elements.
List:Date()List:Date()Returns: list
Create an empty date list.This list can hold only date/datetime elements.
List:Bool()List:Bool()Returns: list
Create an empty boolean list.This list can hold only boolean values.
List:Float()List:Float()Returns: list
Create an empty decimal list.This list can hold only decimal numbers.

 Map Functions

OperatorFormatReturns
get(<string>)<map>.get(<string>)Returns the String value to which the specified key is mapped in this identity hash map. Returns null if the map contains no mapping for this key.
size()<map>.size()Returns a number which represents the size of the given map.
isEmpty()<map>.isEmpty()Returns a Boolean value - True if this map contains no key-value mappings;
- False, if this map contains key-value mappings.
containKey(<string>)<map>.containKey(<string>)Returns a Boolean value - True, if this map contains a mapping for the specified key;
- False, if this map does not contain a mapping for the specified key.
containValue(<value>)<map>.containValue(<value>)Returns a Boolean value - True, if this map maps one or more keys to the specified value; otherwise false
keys()<map>.keys()Returns a List of the keys contained in this map.
toMap()<string>.toMap()Returns the Map from given JSON formated String
Map()Map()Returns the Empty Map

 XML Functions

OperatorFormatReturns
execute(<string>)<xml>.execute(<string>)Returns the Formated String from the given xpath and xml
toXML()<string>.toXml()Returns the Xml from given String

 URL Functions

OperatorFormatReturns
getUrl(<string>)getUrl(<url-string>)Returns map that contains the response
information
postUrl(<string>,<map>)postUrl(<url-string>,<data-map>)Returns map that contains the response
information
encodeUrl(<string>)encodeUrl(<url-string>)Encodes "all space characters" and the "other characters disallowed in a URL string" and returns the encoded string. For example,
myURL = "http://www.test/zohotest?name=John Doe&country=New Zealand&age=101";
myEncodedURL = encodeUrl(myURL);
This function can be used in getURL(), postURL() and openURL() Deluge tasks to encode the required URL and then pass the encoded URL string. For example,
userName=encodeUrl(input.Name);
openUrl("#View:SampleHTML?userName="+userName, "new window");

 Form Data Functions

OperatorFormatReturns
getFieldNames()getFieldNames()Returns list:string that contains all the fields in the form.
getFieldNames is supported only in the onSuccess action
getFieldValue()getFieldValue(<field-name>)Returns the value of the given field.

The sample application GetFieldNames  uses the getFieldNames() and getFieldValue() functions in Form A -> on add -> on success block . The script iterates each list value (field name) and gets the value of this field. The field name and value is updated in a user variable "fieldNameVsVal" and used in the message block of the sendmail() task.