KG CRM Solutions

Home » Zoho » System Variables & Built-in function in zoho Creator

System Variables & Built-in function in zoho Creator

Posted: September 11, 2020
Comments: 0

Predefined Variables or System Variables:

System Variables are a special class of predefined variables, which are already defined by the system, and values are assigned the system itself. they contain values that do not change by the user

These variables are used to refer to common information like the email id of the logged-in user, or the email id of the app admin, the current date, and so on.


  1. Date Variables:


(i). Zoho.Currentdate ( Current date in the format specified in Application settings)

e.g - Date = zoho.currentdate;

(ii). Zoho.currenttime (Current date and time in the format specified in Application settings).

e.g - Time = zoho.currenttime;

  1. String Variables:


Zoho.loginuser (user name of the currently logged user)& zoho.loginuserid (Email address of the currently logged user)

  1. Other variables:


Zoho.adminuser, zoho.adminuserid, zoho.appname, zoho.ipaddress,  zoho.appuri.

I. Zoho.adminuser - (user name of the application owner).

II. zoho.adminuserid - (Email address of the application owner).

III. zoho.appname - (Application link name of the current application).

IV. zoho.ipaddress - (public IP address of the current user).

V. zoho.appuri - (Application details in the format:
/<admin_username>/<application_link_name>/).

Built-in function: Deluge provides many built-in functions so that you can perform common tasks, without having to write code. You can perform such common everyday tasks using pre-defined built-in functions.

Various Types of Built-in functions :-

  1. Collection function: i. Clear <variable>=<collectionVariable>.clear();


ii. size - <variable>=<collectionVariable>.size();

iii. notcontains - /*The notContains() function on TEXT input value*/  

products="Zoho Creator";  boolVal=products.notContains("Creator");// returns false  

 /*The notContains() function performs a case-sensitive search*/

 products = "Zoho Creator";  boolVal = products.notContains("CREATOR");// returns true

iv. insert - products=collection("Creator","CRM","Campaigns");  products.insert("Analytics");// inserts "Analytics" to the existing collection

  1. Conversion function:


i. toDecimal() - The toLong function takes an expression as an argument, and returns a number. e.g marks=99.9;   info toLong(marks);// Returns 99

ii. toString() - dateValue='01-Jan-2019 10:15:30';  info toString(dateValue,"MMM dd, yy 'at' hh:mm:ss, E","Europe/Moscow");// Returns "Jan 01, 19 at 07:45:30, Fri"

iii. toList() - <variable>=<source_text>.toList(<separator>);

products = "ZohoCreator/ZohoCRM";  productList = products.toList("/");  info productList;// Returns ZohoCreator,ZohoCRM

iv. toMap() - The toMap function takes a JSON formatted text as an argument, and returns a key-value pair.

products = "{company:Zoho, product:Creator}";  info products.toMap(); // Returns the key-value pair {"product":"Creator","company":"Zoho"}

Date-time functions: i. addday() , addHour(), addMintues, addSeconds(), addWeek(), addMonth(), addYear();

List functions: add(), addAll(), Clear(), Contains(), toList();

Text Function: i. concat() - text1="Zoho";  text2="Deluge";  result=text1.concat(text2); info "ZohoDeluge";

ii. contains()- Product = "Zoho Creator";
check = Product.contains("Creator");    // returns true


iii. find() -  text="Hello world, welcome to the universe";
firstIndex = text.find("e");              //returns 1

iv. replaceFirst() - mainString="Create online database applications";
newText = replaceFirst(mainString, "online", "custom");
// returns "Create custom database applications"

Related Posts