text Functions
    contains

    Returns 'true' if the specified substring is present in the given string

    Syntax

    <text1>.contains(<text2>);

    Example

    info "Zoho Creator".contains("Zoho"); /// Returns: true

    functionId tryout-example

    product_name="Zoho Creator"; org_name="Zoho"; info product_name.contains(org_name);

    syntax-desc

    Returns 'true' if the main text includes the specified text. Otherwise it will return 'false'

    related-functions
    syntax

    <text1>.contains(<text2>);

    tryout-desc

    Here main text "ZohoCreator" contains the specific text "Zoho" so it returns true. Otherwise it will return false.

    startsWith

    Returns true if sourcestring starts with searchstring.

    Syntax

    <text1>.startsWith(<text2>);

    Example

    info "ZohoCreator".startsWith("Zoho"); /// Returns: true

    functionId tryout-example

    product_name="Zoho Creator"; result = product_name.startsWith("Zoho"); info result;

    syntax-desc

    Returns 'true' if the given text starts with specified text. Otherwise it will return 'false'.

    related-functions
    syntax

    <text1>.startsWith(<text2>);

    tryout-desc

    Here text "Zoho Creator" starts with "Zoho", hence it returns true. Otherwise it will return 'false'.

    endsWith

    Returns true if sourcestring ends with searchstring.

    Syntax

    <text1>.endsWith(<text2>);

    Example

    info "Zoho Creator".endsWith("Creator"); /// Returns: true

    functionId tryout-example

    product_name="Zoho Creator"; org_name="Creator"; info product_name.endsWith(org_name);

    syntax-desc

    Returns 'true' if the specified text is at the end of the main text. Otherwise it will return 'false'.

    related-functions
    syntax

    <text1>.endsWith(<text2>);

    tryout-desc

    Here the specified text "Creator" is at the end of the main text "Zoho Creator", hence it returns true. Otherwise it will return false.

    equalsIgnoreCase

    Returns true if string1 equals string2.

    Syntax

    <text1>.equalsIgnoreCase(<text2>);

    Example

    info "Hello World!".equalsIgnoreCase("hello world!"); /// Returns: true

    functionId tryout-example

    product_name="Zoho Creator"; org_name="zoho creator"; info product_name.equalsIgnoreCase(org_name);

    syntax-desc

    Returns 'true' if the main text is equal to the specified text. Otherwise it will return 'false'.

    related-functions
    syntax

    <text1>.equalsIgnoreCase(<text2>);

    tryout-desc

    Here main text "Zoho Creator" is equal to specified text "zoho creator" as case sensitivity is ignored, hence it will return 'true'. Otherwise it will return 'false'.

    matches

    Returns true if sourcestring matches specified regex pattern.

    Syntax

    <text>.matches(<regex>);

    Example

    info "ID004500F".matches("[A-Z]{2}[0-9]{6}[A-Z]"); /// Returns: true

    functionId tryout-example

    username="ZC000001APP"; result = username.matches("[A-Z]{2}[0-9]{6}[A-Z]{3}"); info result;

    syntax-desc

    Returns 'true' if given text matches with the regular expression. Otherwise it will return 'false'.

    related-functions
    syntax

    <text>.matches(<regex>);

    tryout-desc

    Here username consist of first '2' letters as alphabets followed by '6' digits and '3' alphabets. Regular expression satisfies the same criteria, hence it will return 'true'. Otherwise it will return 'false'.

    getAlpha

    Returns only alphabets present in the string.

    Syntax

    <text>.getAlpha();

    Example

    result = "1-Red,2-Green,3-Blue".getAlpha(); info result; /// Returns: "RedGreenBlue"

    functionId tryout-example

    form_name="Form-1,Form-2,Form-3"; info form_name.getAlpha();

    syntax-desc

    Returns only alphabets from the given text and ignores the rest. Returns the empty text if alphabets are not found in given text.

    related-functions
    syntax

    <text>.getAlpha();

    tryout-desc

    Here text "Form-1,Form-2,Form-3" contains alphabets(words) "Form", Numbers(1,2,3) and special characters('-'&','), hence it will return "FormFormForm". Otherwise it will return empty string.

    getAlphaNumeric

    Returns only the alphanumeric characters present in the specified string.

    Syntax

    <text>.getAlphaNumeric();

    Example

    result = "1-Red,2-Green,3-Blue".getAlphaNumeric(); info result; /// Returns: "1Red2Green3Blue"

    functionId tryout-example

    form_name="Form-1,Form-2,Form-3"; info form_name.getAlphaNumeric();

    syntax-desc

    Returns alphabets and numbers from the given text and ignores the rest. Returns empty text if alphabets and numbers are not found in given text.

    related-functions
    syntax

    <text>.getAlphaNumeric();

    tryout-desc

    Here text "Form-1,Form-2,Form-3" contains alphabets(words) "Form", Numbers(1,2,3) and special characters('-'&','), hence it will return "Form1Form2Form3". Otherwise it will return empty text.

    getOccurenceCount

    Returns the number of times a substring is present in the given string.

    Syntax

    <text1>.getOccurenceCount(<text2>);

    Example

    result = "You are a very very nice person".getOccurenceCount("very"); info result; /// Returns: 2

    functionId tryout-example

    statement = "Zoho Creator is a Zoho Product"; result = statement.getOccurenceCount("Zoho"); info result;

    syntax-desc

    Returns a value which represents number of times the substring (word/alphabet) has occurred. Returns '0' if the substring is not present.

    related-functions
    syntax

    <text1>.getOccurenceCount(<text2>);

    tryout-desc

    Here in the sentence the word "Zoho" occurred 2 times hence the answer is '2'. Otherwise it will return '0'.

    getPrefix

    Returns the string before the specified substring.

    Syntax

    <text1>.getPrefix(<text2>);

    Example

    result = "One Two Three".getPrefix("Two"); info result; /// Returns: "One "

    functionId tryout-example

    product_name="Zoho Creator"; result = product_name.getPrefix("Creator"); info result;

    syntax-desc

    Returns the text which is present before the mentioned text. If no prefix is found, the function will return an empty text. If the subtext is not found in the source text, the function will return null.

    related-functions
    syntax

    <text1>.getPrefix(<text2>);

    tryout-desc

    In the source text - "Zoho Creator", the prefix of subtext - "Creator" is "Zoho ". Hence, it will return "Zoho ".

    getSuffix

    Returns the string after the specified substring.

    Syntax

    <text1>.getSuffix(<text2>);

    Example

    result = "One Two Three".getSuffix("Two"); info result; /// Returns: " Three"

    functionId tryout-example

    product_name="Zoho Creator"; result = product_name.getSuffix("Zoho"); info result;

    syntax-desc

    Returns the text which is present after the mentioned text. If no suffix is found, the function will return an empty text. If the subtext is not found in the source text, the function will return null.

    related-functions
    syntax

    <text1>.getSuffix(<text2>);

    tryout-desc

    Here " Creator" is suffix of "Zoho" as it occurs right after "Zoho", hence it will return " Creator". If no suffix is found then it will return an empty string.

    indexOf

    Returns the position of the given substring in the string (first character's position is '0')

    Syntax

    <text1>.indexOf(<text2>);

    Example

    result = "Red ,Green ,Blue".indexOf("Green"); info result; /// Returns: 5

    functionId tryout-example

    product_name="Zoho Creator"; result = product_name.indexOf("Creator"); info result;

    syntax-desc

    Returns the position of the given substring in main text. Otherwise it will return '-1' if text is not found.

    related-functions
    syntax

    <text1>.indexOf(<text2>);

    tryout-desc

    Here the text "Zoho Creator" has substring "Creator" on 5th position (starting from '0'), hence it returns 5. A substring can be a word or alphabet. Returns '-1' if word/alphabet is not found.

    lastIndexOf

    Returns the position of the last occurence of the substring in the string.

    Syntax

    <text1>.lastIndexOf(<text2>);

    Example

    result = "Red ,Green ,Green".lastIndexOf("Green"); info result; /// Returns: 12

    functionId tryout-example

    product_name="Zoho Creator Creator"; result = product_name.lastIndexOf("Creator"); info result;

    syntax-desc

    Returns the position of last occurence of mentioned substring in main text. Returns '-1' if subtext is not found.

    related-functions
    syntax

    <text1>.lastIndexOf(<text2>);

    tryout-desc

    Here the text "Zoho Creator Creator" contains text "Creator" two times having '5' and '13' as their positions, hence it returns '13' as last index. Returns '-1' if text is not found.

    remove

    Removes and returns the specified substring present in the string

    Syntax

    <text1>.remove(<text2>);

    Example

    info "Red ,Green ,Green".remove("Green"); /// Returns: "Red , ,"

    functionId tryout-example

    product_name="Zoho Creator Zoho Creator"; result = product_name.remove("Creator"); info result;

    syntax-desc

    Removes the specified text and returns the edited text. The original text remains unaffected. Returns unchanged text if the specified text is not found.

    related-functions
    syntax

    <text1>.remove(<text2>);

    tryout-desc

    Here the text "Zoho Creator Zoho Creator" contains "Creator" two times hence all occurences of "Creator" has been removed from the text. If specified text is not found then it will return the original string.

    removeAllAlpha

    Removes all the alphabets present in the specified string.

    Syntax

    <text>.removeAllAlpha();

    Example

    info "1-Red,2-Grean,3-Blue".removeAllAlpha(); /// Returns: "1-,2-,3-"

    functionId tryout-example

    product_name = "I have 12-Zoho Creator Applications"; result = product_name.removeAllAlpha(); info result;

    syntax-desc

    Removes all alphabets from the given text and returns the edited text. If the source text doesn't have numbers or special characters, the function returns an empty text. If the source text doesn't have letters, the function returns the unchanged text.

    related-functions
    syntax

    <text>.removeAllAlpha();

    tryout-desc

    Here the text "I have 12-Zoho Creator Applications" contains '12' as numeric value, "-" as special character and remaining text has alphabets hence all alphabets are removed and '12-' is returned. Returns nothing if there are no numbers or special characters.

    removeAllAlphaNumeric

    Remove all the alphanumeric characters present in the specified string.

    Syntax

    <text>.removeAllAlphaNumeric();

    Example

    info "1-Red,2-Grean,3-Blue".removeAllAlphaNumeric(); /// Returns: "-,-,-"

    functionId tryout-example

    product_name = "I have 12-Zoho Creator Applications"; result = product_name.removeAllAlphaNumeric(); info result;

    syntax-desc

    Removes all alphabets and numbers from the given text and returns the edited text. If the source text doesn't have special characters, the function returns an empty text. If the source text doesn't have letters or numbers, the function returns the unchanged text.

    related-functions
    syntax

    <text>.removeAllAlphaNumeric();

    tryout-desc

    Here the text "I have 12-Zoho Creator Applications" contains '12' as numeric value, "-" as special character and remaining text has alphabets hence all alphabets and numbers are removed and '-' is returned. Returns nothing if there are no special characters.

    removeFirstOccurence

    Removes the first occurence of the substring from the given string..

    Syntax

    <text1>.removeFirstOccurence(<text2>);

    Example

    info "Red ,Green ,Green".removeFirstOccurence("Green"); /// Returns: "Red , ,Green"

    functionId tryout-example

    product_name="Zoho Creator Zoho Creator"; result = product_name.removeFirstOccurence("Creator"); info result;

    syntax-desc

    Removes first occurence of the specified text and returns the edited text. Returns unchanged text if the specified text is not found.

    related-functions
    syntax

    <text1>.removeFirstOccurence(<text2>);

    tryout-desc

    Here the text "Zoho Creator Zoho Creator" contains "Creator" two times hence first occurence of "Creator" will be removed from the text. If specified text is not found then original string will be returned.

    removeLastOccurence

    Removes the last occurence of the substring from the string.

    Syntax

    <text1>.removeLastOccurence(<text2>);

    Example

    info "Red ,Green ,Green".removeLastOccurence("Green"); /// Returns: "Red ,Green ,"

    functionId tryout-example

    product_name="Zoho Creator Zoho Creator"; result = product_name.removeLastOccurence("Creator"); info result;

    syntax-desc

    Removes last occurence of the specified text and returns the edited text. Returns unchanged text if the specified text is not found.

    related-functions
    syntax

    <text1>.removeLastOccurence(<text2>);

    tryout-desc

    Here the text "Zoho Creator Zoho Creator" contains "Creator" two times hence last occurence of "Creator" will be removed from the text. If specified text is not found then original string will be returned.

    replaceAll

    Replaces all Occurence of the string that matches the given <searchString> expression with the given <replacementString>.

    Syntax

    <text1>.replaceAll(<text2>,<text3>,<true/false>);

    Example

    info "Red ,Green ,Green".replaceAll("Green","Blue"); /// Returns: "Red ,Blue ,Blue"

    functionId tryout-example

    /*Example 1*/ product_name="Zoho Creator Zoho Creator"; result = product_name.replaceAll("Creator","CRM"); info result; // returns Zoho CRM Zoho CRM /*Example 2*/ email_id = "shawn24@zylker.com"; result1 = email_id.replaceAll("(.*)@([a-z]*).com",""); info result1; // returns /*Example 3*/ email_id = "shawn24@zylker.com"; result2 = email_id.replaceAll("(.*)@([a-z]*).com","", true); info result2; // returns shawn24@zylker.com

    syntax-desc

    Replaces all the occurrence of given text () with specified text () and returns the updated source text (). Returns unchanged source text if specified text is not found. If the third param is set as true, the regex pattern provided in the search text are ignored while searching. By default, the third param is set as false.

    related-functions
    syntax

    <text1>.replaceAll(<text2>,<text3>,<true/false>);

    tryout-desc

    Example 1: The text "Zoho Creator Zoho Creator" contains "Creator" two times. Hence, all the occurrences of "Creator" will be replaced by "CRM".
    Example 2: This example searches for the regex pattern specified in the first param and replaces all of its occurrences with the second param, if found. Hence, it returns "".
    Example 3: It returns the source text as such. This is because the third parameter is set to true. So, even though the regex pattern is found, it is not considered as a match.

    replaceFirst

    Replaces the first Occurence of the string that matches the given searchString expression with the given replacementString

    Syntax

    <text1>.replaceFirst(<text2>,<text3>,<true/false>);

    Example

    info "Red ,Green ,Green".replaceFirst("Green","Blue"); /// Returns: "Red ,Blue ,Green"

    functionId tryout-example

    /*Example 1*/ product_name="Zoho Creator Zoho Creator"; result = product_name.replaceFirst("Creator","CRM"); info result; // returns Zoho CRM Zoho Creator /*Example 2*/ email_id = "shawn24@zylker.com"; result1 = email_id.replaceFirst("(.*)@([a-z]*).com",""); info result1; // returns /*Example 3*/ email_id = "shawn24@zylker.com"; result2 = email_id.replaceFirst("(.*)@([a-z]*).com","", true); info result2; // returns shawn24@zylker.com

    syntax-desc

    Replaces the first occurrence of given text () with specified text () and returns the updated source text (). Returns unchanged source text if specified text is not found. If the third param is set as true, the regex pattern provided in the search text are ignored while searching. By default, the third param is set as false.

    related-functions
    syntax

    <text1>.replaceFirst(<text2>,<text3>,<true/false>);

    tryout-desc

    Example 1: The text "Zoho Creator Zoho Creator" contains "Creator" two times, and only the first occurrence of "Creator" will be replaced by "CRM". Hence, it returns "Zoho CRM Zoho Creator".
    Example 2: This example searches for the first occurrence of the regex pattern specified in the first param and replaces it with the second param, if found. Hence, it returns "".
    Example 3: It returns the source text as such. This is because the third parameter is set to true. So, even though the regex pattern is found, it is not considered as a match.

    toLowerCase

    Convert the string to lowercase.

    Syntax

    <text>.toLowerCase();

    Example

    info "ZohoCreator".toLowerCase(); /// Returns: "zohocreator"

    functionId tryout-example

    product_name="ZOHO CREATOR"; result = product_name.toLowerCase(); info result;

    syntax-desc

    Replaces all uppercase alphabets to lowercase and return the updated text. If no uppercase alphabets are present then unchanged text is returned.

    related-functions
    syntax

    <text>.toLowerCase();

    tryout-desc

    Here the text "ZOHO CREATOR" is in uppercase which will be converted to lowercase, hence it will return "zoho creator". If no uppercase alphabets are present then unchanged text is returned.

    toUpperCase

    Convert the string to uppercase.

    Syntax

    <text>.toUpperCase();

    Example

    info "ZohoCreator".toUpperCase(); /// Returns: "ZOHOCREATOR"

    functionId tryout-example

    product_name="Zoho Creator"; result = product_name.toUpperCase(); info result;

    syntax-desc

    Replaces all lowercase alphabets to uppercase and return the updated text. If no lowercase alphabets are present then unchanged text is returned.

    related-functions
    syntax

    <text>.toUpperCase();

    tryout-desc

    Here the text "Zoho Creator" contains both uppercase and lowercase alphabets which will be converted to uppercase, hence it will return "ZOHO CREATOR". If no lowercase alphabets are present then unchanged text is returned.

    upper

    Convert the string to uppercase.

    Syntax

    <text>.upper();

    Example

    info "ZohoCreator".upper(); /// Returns: "ZOHOCREATOR"

    functionId tryout-example

    product_name="Zoho Creator"; result = product_name.upper(); info result;

    syntax-desc

    Replaces all lowercase alphabets to uppercase and return the updated text. If no lowercase alphabets are present then unchanged text is returned.

    related-functions
    syntax

    <text>.upper();

    tryout-desc

    Here the text "Zoho Creator" contains both uppercase and lowercase alphabets which will be converted to uppercase, hence it will return "ZOHO CREATOR". If no lowercase alphabets are present then unchanged text is returned.

    lower

    Convert the string to lowercase.

    Syntax

    <text>.lower();

    Example

    info "ZohoCreator".lower(); /// Returns: "zohocreator"

    functionId tryout-example

    product_name="ZOHO CREATOR"; result = product_name.lower(); info result;

    syntax-desc

    Replaces all uppercase alphabets to lowercase and returns the updated text. If no uppercase alphabets are present then unchanged text is returned.

    related-functions
    syntax

    <text>.lower();

    tryout-desc

    Here the text "ZOHO CREATOR" is in uppercase which will be converted to lowercase, hence it will return "zoho creator". If no uppercase alphabets are present then unchanged text is returned.

    trim

    Removes any leading and trailing whitespace from a string

    Syntax

    <text>.trim();

    Example

    info " Welcome to Zoho Creator ".trim();/// Returns: "Welcome to Zoho Creator"

    functionId tryout-example

    product_name=" Zoho Creator "; result = product_name.trim(); info result;

    syntax-desc

    Returns a new text with all the unnecessary leading and trailing whitespaces from the source text removed. If no such whitespaces are present, an unchanged copy of the source text is returned.

    related-functions
    syntax

    <text>.trim();

    tryout-desc

    Here, the source text - " Zoho Creator " has unnecessary leading and trailing whitespaces. The trim() function removes these spaces and returns "Zoho Creator".

    subString

    Returns the string from the specified startindex to the endindex.

    Syntax

    <text>.subString(<startIndex>,<endIndex>);

    Example

    info "ZohoCreator".subString(0,4); /// Returns: "Zoho"

    functionId tryout-example

    product_name="Zoho Creator"; result = product_name.subString(0,4); info result;

    syntax-desc

    Returns part of text with mentioned range from startIndex (inclusive) to endIndex (exclusive). Returns nothing if startIndex is equal to endIndex'.

    related-functions
    syntax

    <text>.subString(<startIndex>,<endIndex>);

    tryout-desc

    Here 'product_name.subString(0,4)' will return text from position '0' to '4', hence it returns "Zoho". Returns nothing if startIndex is equal to endIndex'.

    subText

    Returns the string from the specified startindex to the endindex.

    Syntax

    <text>.subText(<number>,<number>);

    Example

    info "ZohoCreator".subText(0,4); /// Returns: "Zoho"

    functionId tryout-example

    product_name="Zoho Creator"; result = product_name.subText(0,4); info result;

    syntax-desc

    Returns part of text with mentioned range from startIndex (inclusive) to endIndex (exclusive). Returns nothing if startIndex is equal to endIndex'.

    related-functions
    syntax

    <text>.subText(<number>,<number>);

    tryout-desc

    Here 'product_name.subText(0,4)' will return text from position '0' to '4', hence it returns "Zoho". Returns nothing if startIndex is equal to endIndex'.

    left

    Returns the specified number of characters from the left of the source text

    Syntax

    <text>.left(<number>);

    Example

    info "Pad me".left(3); /// Returns: "Pad"

    functionId tryout-example

    product_name="Zoho Creator"; info product_name.left(4);

    syntax-desc

    Returns the piece of text specified by the number of characters starting from the left

    related-functions
    syntax

    <text>.left(<number>);

    tryout-desc

    Here, the left() function extracts the left most 4 characters from the given text. Hence, it returns 'Zoho'.

    toCollection

    Returns the Map from given JSON formatted String

    Syntax

    <text1>.toCollection(<text2>);

    Example

    info "read write speak".toCollection(" "); /// Returns: {"read","write","speak"}

    functionId tryout-example

    product_name="Zoho Creator Application"; result = product_name.toCollection(" "); info result;

    syntax-desc

    If the given text is in the form of list then it splits the text by the given subtext and converts them into list . If given subtext is not present, then it will return the unchanged text in the list. If it is in the form of map, then the text is converted into map

    related-functions
    syntax

    <text1>.toCollection(<text2>);

    tryout-desc

    Here 'toCollection(" ")' function will convert the text to list or map

    right

    Returns the specified number of characters from the right of the source text

    Syntax

    <text>.right(<number>);

    Example

    info "Pad me".right(3); /// Returns: " me"

    functionId tryout-example

    product_name="Zoho Creator"; info product_name.right(7);

    syntax-desc

    Returns the piece of text specified by the number of characters starting from the right.

    related-functions
    syntax

    <text>.right(<number>);

    tryout-desc

    Here, the right() function extracts the right most 7 characters from the given text. Hence, it returns 'Creator'.

    proper

    Capitalizes the first letter after every space, in a specified string, leaving all other letters in lowercase

    Syntax

    <text>.proper();

    Example

    info "Create online database applications".proper(); /// Returns: "Create Online Database Applications"

    functionId tryout-example

    product_name="welcome to zoho creator!"; info product_name.proper();

    syntax-desc

    Returns the text after converting first alphabet of each word of the sentence in uppercase.

    related-functions
    syntax

    <text>.proper();

    tryout-desc

    Here 'Proper()' function converts first alphabet of every word in the sentence 'welcome to zoho creator!' to uppercase, hence it returns "Welcome To Zoho Creator!". If first alphabet of a word is already in uppercase then no changes are made in that word.

    containsIgnoreCase

    Returns 'True' if specified first string contains specified second string irrespective of uppercase/lowercase, else returns 'false'.

    Syntax

    <text1>.containsIgnoreCase(<text2>);

    Example

    info "RED,GREEN,BLUE".containsIgnoreCase("Blue"); /// Returns: true

    functionId tryout-example

    app_name="ZOHO CREATOR APPLICATION"; info app_name.containsIgnoreCase("Application");

    syntax-desc

    Returns 'true' if the mentioned text is found in main text irrespective of uppercase/lowercase. Otherwise it will return false.

    related-functions
    syntax

    <text1>.containsIgnoreCase(<text2>);

    tryout-desc

    Here the text contains the word "Application" in main text "ZOHO CREATOR APPLICATION" irrespective of uppercase/lowercase, hence it returns 'true'. Otherwise it will return 'false'.

    notContains

    Returns 'True' if specified first string does not contain specified second string, else returns 'false', while the search performed is strictly case-sensitive.

    Syntax

    <text1>.notContains(<text2>);

    Example

    info "RED,GREEN,BLUE".notContains("YELLOW"); /// Returns: true

    functionId tryout-example

    app_name="ZOHO CREATOR APPLICATION"; info app_name.notContains("APPLICATION");

    syntax-desc

    Returns 'true' if the mentioned text is not found in main text . Otherwise it will return false.

    related-functions
    syntax

    <text1>.notContains(<text2>);

    tryout-desc

    Here the text does not contain the word "APPLICATION" in main text "ZOHO CREATOR", hence it returns 'true'. Otherwise it will return 'false'. This search is strictly case-sensitive.

    find

    Returns the first occurence position of the specified value in a string

    Syntax

    <text1>.find(<text2>);

    Example

    text="Hello, world".find("world"); info text; /// Returns: 7

    functionId tryout-example

    product_name="Zoho Creator Application"; info product_name.find("Creator");

    syntax-desc

    Returns the starting index of first occurence of the mentioned text in main text.

    related-functions
    syntax

    <text1>.find(<text2>);

    tryout-desc

    Here 'Find()' function finds the first occurence of the mentioned string "Creator" and returns the start index of the same in given text "Zoho Creator Application", hence it returns '5'. Returns '-1' if the text is not found.

    leftPad

    Returns the input string with whitespace characters padded to the left of the string.

    Syntax

    <text>.leftPad(<number>);

    Example

    info "Pad me".leftPad(10); /// Returns: " Pad me"

    functionId tryout-example

    product_name="Zoho Creator"; info product_name.leftPad(15);

    syntax-desc

    Returns the given text after adding whitespace characters to its left so that the total size of string matches the specified number.

    related-functions
    syntax

    <text>.leftPad(<number>);

    tryout-desc

    Here 'leftPad()' is expected to produce a text of length 15 characters. The original text being 12 characters, leftPad() pads 3 whitespaces to the left making it 15 characters.

    mid

    Returns the string from the specified startindex to the endindex.

    Syntax

    <text>.mid(<number>,<number>);

    Example

    info "Hello world, welcome to the Universe".mid(6,11); /// Returns: "world"

    functionId tryout-example

    app_name="Zoho Creator Application"; info app_name.mid(5,12);

    syntax-desc

    Returns the part of given text from mentioned index range.

    related-functions
    syntax

    <text>.mid(<number>,<number>);

    tryout-desc

    Here 'mid()' function returns the part of given text "Zoho Creator Application" from mentioned index range '(5,12)' with indexes 5 and 12 inclusive. Hence, it returns "Creator". Index range should not exceed the given text length.

    rightPad

    Returns the input string with whitespace characters padded to the right of the string.

    Syntax

    <text>.rightPad(<number>);

    Example

    info "Pad me".rightPad(10); /// Returns: "Pad me "

    functionId tryout-example

    product_name="Zoho Creator"; info product_name.rightPad(15);

    syntax-desc

    Returns the given text after adding whitespace characters to its right so that the total size of string matches the specified number.

    related-functions
    syntax

    <text>.rightPad(<number>);

    tryout-desc

    Here 'rightPad()' is expected to produce a text of length 15 characters. The original text being 12 characters, rightPad() pads 3 whitespaces to the right making it 15 characters.

    startsWithIgnoreCase

    Returns 'True' if the specified first string starts with the specified second string irrespective of uppercase/lowercase, else returns 'false'.

    Syntax

    <text1>.startsWithIgnoreCase(<text2>);

    Example

    info "ZohoCreator".startsWithIgnoreCase("zoho"); /// Returns: true

    functionId tryout-example

    product_name="Creator Application"; result = product_name.startsWithignorecase("Creator"); info result;

    syntax-desc

    Returns 'true' if the given text starts with specified text. Otherwise it will return 'false'. The search is irrespective of uppercase/lowercase.

    related-functions
    syntax

    <text1>.startsWithIgnoreCase(<text2>);

    tryout-desc

    Here text "Creator Application" starts with "Creator", hence it returns true. Otherwise it will return 'false'. The search is irrespective of uppercase/lowercase.

    endsWithIgnoreCase

    Returns 'True' if the specified first string ends with the specified second string irrespective of uppercase/lowercase, else returns 'false'.

    Syntax

    <text1>.endsWithIgnoreCase(<text2>);

    Example

    info "ZohoCreator".endsWithIgnoreCase("creator"); /// Returns: true

    functionId tryout-example

    product_name="Creator Application"; result = product_name.endsWithIgnoreCase("Application"); info result;

    syntax-desc

    Returns 'true' if the given text ends with specified text. Otherwise it will return 'false'. The search is irrespective of uppercase/lowercase.

    related-functions
    syntax

    <text1>.endsWithIgnoreCase(<text2>);

    tryout-desc

    Here text "Creator Application" ends with "Creator", hence it returns true. Otherwise it will return 'false'. The search is irrespective of uppercase/lowercase.

    concat

    Concatenate given strings

    Syntax

    <text1>.concat(<text2>);

    Example

    info "Zoho ".concat("Creator"); /// Returns: Zoho Creator

    functionId tryout-example

    org_name="Zoho "; service="Creator"; result = org_name.concat(service); info result;

    syntax-desc

    Append/Concat a string to another string.

    related-functions
    syntax

    <text1>.concat(<text2>);

    tryout-desc

    Two strings "Zoho" and "Creator" concatenated/appended and gives "Zoho Creator"

    equals

    Checks equility of given objects

    Syntax

    <anyType>.equals(<anyType>);

    Example

    info "Zoho ".equals("zoho"); /// Returns: false

    functionId tryout-example

    info '01/01/2017'.equals('01-Jan-2017');

    syntax-desc

    Checks equality of passed values. It can be any types.

    related-functions
    syntax

    <anyType>.equals(<anyType>);

    tryout-desc

    Though both dates are equal but with different format, it returns true.

number Functions
    abs

    Returns the absolute value of a number

    Syntax

    <number / decimal>.abs();

    Example

    info -2.abs(); /// Returns: 2

    functionId tryout-example

    number=-3.45; info number.abs();

    syntax-desc

    Returns the absolute value of given number by making it positive.

    related-functions
    syntax

    <number / decimal>.abs();

    tryout-desc

    Here 'abs()' function returns the absolute value of given number, hence it returns '3.45'. A number can be positive, negative or in fraction.

    cos

    Returns the trigonometric cosine of the given angle ( in radians )

    Syntax

    <number / decimal>.cos();

    Example

    info 45.cos(); /// Returns: 0.5253219888177297

    functionId tryout-example

    angle = 1.0471975511965979; info angle.cos();

    syntax-desc

    Returns the trigonometric cosine of the angle (in radians) specified by <number/decimal>.

    related-functions
    syntax

    <number / decimal>.cos();

    tryout-desc

    The cos() function returns a number that represents the trigonometric cosine of the given angle. In the example presented, the specified angle is 1.0471975511965979 radians, i.e., (60°*pi)/180. Hence, it returns 0.5, as cos (60°) = 0.5.

    sin

    Returns the trigonometric sine of the given angle ( in radians )

    Syntax

    <number / decimal>.sin();

    Example

    info 45.sin(); /// Returns: 0.8509035245341184

    functionId tryout-example

    angle = 1.57079632679; info angle.sin();

    syntax-desc

    Returns the trigonometric sine of the angle (in radians) specified by <number/decimal>.

    related-functions
    syntax

    <number / decimal>.sin();

    tryout-desc

    The sin() function returns a number that represents the trigonometric sine of the given angle. In the example presented, the specified angle is 1.57079632679 radians, i.e., (90°*pi)/180. Hence, it returns 1.0, as sin (90°) = 1.

    tan

    Returns the trigonometric tangent of the given angle ( in radians)

    Syntax

    <number / decimal>.tan();

    Example

    info 45.tan(); /// Returns: 1.6197751905438615

    functionId tryout-example

    angle= 0.7853981633974483; info angle.tan();

    syntax-desc

    Returns the trigonometric tangent of the angle (in radians) specified by <number/decimal>.

    related-functions
    syntax

    <number / decimal>.tan();

    tryout-desc

    The tan() function returns a number that represents the trigonometric tangent of the given angle. In the example presented, the specified angle is 0.7853981633974483 radians, i.e., (45°*pi)/180. Hence, it returns 1, as tan (45°) = 1.

    acos

    Returns the angle of the given trigonometric cosine ( in radians)

    Syntax

    <number / decimal>.acos();

    Example

    info 0.5.acos(); /// Returns: 1.0471975511965979

    functionId tryout-example

    value = 0.5; info value.acos();

    syntax-desc

    Returns the angle (in radians) of the trigonometric cosine specified by <number/decimal>.

    related-functions
    syntax

    <number / decimal>.acos();

    tryout-desc

    The acos() function returns a number that represents the angle(in radians) of the given trigonometric cosine. In the example presented, the specified trigonometric cosine is 0.5. Hence, it returns 1.0471975511965979 radians, i.e., (60°*pi)/180, as arccos (0.5) = 60°.

    asin

    Returns the angle of the given trigonometric sine ( in radians)

    Syntax

    <number / decimal>.asin();

    Example

    info 0.5.asin(); /// Returns: 0.5235987755982989

    functionId tryout-example

    value = 1; info value.asin();

    syntax-desc

    Returns the angle (in radians) of the trigonometric sine specified by <number/decimal>.

    related-functions
    syntax

    <number / decimal>.asin();

    tryout-desc

    The asin() function returns a number that represents the angle(in radians) of the given trigonometric sine. In the example presented, the specified trigonometric sine is 1. Hence, it returns 1.57079632679 radians, i.e., (90°*pi)/180, as arcsin (1) = 90°.

    atan

    Returns the angle of the given trigonometric tangent ( in radians)

    Syntax

    <number / decimal>.atan();

    Example

    info 45.atan(); /// Returns: 1.5485777614681775

    functionId tryout-example

    value = 1; info value.atan();

    syntax-desc

    Returns the angle (in radians) of the trigonometric tangent specified by <number/decimal>.

    related-functions
    syntax

    <number / decimal>.atan();

    tryout-desc

    The atan() function returns a number that represents the angle(in radians) of the given trigonometric tangent. In the example presented, the specified trigonometric tangent is 1. Hence, it returns 0.7853981633974483 radians, i.e., (45°*pi)/180, as arctan (1) = 45°.

    log

    Returns the logarithmic value (LogeN) of the specified number.

    Syntax

    <number / decimal>.log();

    Example

    info 81.log(); /// Returns: 4.394449154672439

    functionId tryout-example

    number=1; info number.log();

    syntax-desc

    Returns the logarithmic value of the given number (log of given number).

    related-functions
    syntax

    <number / decimal>.log();

    tryout-desc

    Here the 'log()' function returns the logarithmic value of the given integer. This will be calculated as log of given number, hence it returns '0.0'.

    max

    Returns the maximum value in a set of two numeric values.

    Syntax

    <number / decimal>.max(<number / decimal>);

    Example

    info 5.max(7); /// Returns: 7

    functionId tryout-example

    result = 10.max(20); info result;

    syntax-desc

    Returns the maximum of the two numbers.

    related-functions
    syntax

    <number / decimal>.max(<number / decimal>);

    tryout-desc

    Here the 'max()' function compares given values and returns the maximum of the two values, hence it returns '20'.

    min

    Returns the minimum value in a set of two numeric values.

    Syntax

    <number / decimal>.min(<number / decimal>);

    Example

    info 5.min(7); /// Returns: 5

    functionId tryout-example

    result = 10.min(20); info result;

    syntax-desc

    Returns the minimum of the two numbers.

    related-functions
    syntax

    <number / decimal>.min(<number / decimal>);

    tryout-desc

    Here the 'min()' function compares given values and returns the minimum of the two values, hence it returns '10'.

    exp

    Returns 'e' raised to the power of a given number

    Syntax

    <number / decimal>.exp();

    Example

    info 1.exp(); /// Returns: 2.718281828459045

    functionId tryout-example

    number=0; info number.exp();

    syntax-desc

    Returns the exponential value of the given number (e raised to power of number).

    related-functions
    syntax

    <number / decimal>.exp();

    tryout-desc

    Here the 'exp()' function returns the exponential value of the given integer. The number will be raised to power of 'e', hence it returns '1.0'.

    power

    Returns the result of a number raised to a power.

    Syntax

    <number / decimal>.power(<number / decimal>);

    Example

    info 5.power(2); /// Returns: 25

    functionId tryout-example

    result = 10.power(3); info result;

    syntax-desc

    Returns the result of first number raised to power of second number.

    related-functions
    syntax

    <number / decimal>.power(<number / decimal>);

    tryout-desc

    Here in the 'power()' function first number '10' multiplies itself '3' (second number) times, hence the result is '1000'.

    round

    Returns the number after rounding off to the specified number of digits.

    Syntax

    <number / decimal>.round(<number>);

    Example

    info 81.256.round(2); /// Returns: 81.26

    functionId tryout-example

    number = 3.123456; info number.round(4);

    syntax-desc

    Returns a number after rounding it off to given number of digits.

    related-functions
    syntax

    <number / decimal>.round(<number>);

    tryout-desc

    Here the 'round()' function rounds off given number "3.123456" to the specified number '4', hence the result is '3.1235'.

    sqrt

    Returns a positive square root.

    Syntax

    <number / decimal>.sqrt();

    Example

    info 81.sqrt(); /// Returns: 9.0

    functionId tryout-example

    number = 25; info number.sqrt();

    syntax-desc

    Returns the square root of given positive number.

    related-functions
    syntax

    <number / decimal>.sqrt();

    tryout-desc

    Here the 'sqrt()' function returns the square root of the given number '25', hence it returns '5.0'. Square root of negative value will not be calculated.

    toHex

    Converts an integer to a hexadecimal value.

    Syntax

    <number / decimal>.toHex();

    Example

    info 75.toHex(); /// Returns: "4b"

    functionId tryout-example

    number=100; info number.toHex();

    syntax-desc

    Converts the given number into hexadecimal format and returns the value.

    related-functions
    syntax

    <number / decimal>.toHex();

    tryout-desc

    Here 'toHex()' function will convert the given number '100' to its equivalent hexa-decimal format, hence it returns '64'.

    floor

    Returns the number rounded down to the nearest integer.

    Syntax

    <decimal>.floor();

    Example

    info 5.2.floor();/// Returns: 5

    functionId tryout-example

    fieldValue=9.5; info fieldValue.floor();

    syntax-desc

    Returns the number by rounding it down to the next nearest smaller integer.

    related-functions
    syntax

    <decimal>.floor();

    tryout-desc

    Here 'floor()' function converts a given number by rounding it down to the next nearest smaller integer, hence it retruns '9'.

    ceil

    Returns the number rounded up to the nearest integer.

    Syntax

    <number / decimal>.ceil();

    Example

    info 5.2.ceil(); /// Returns: 6

    functionId tryout-example

    fieldValue=9.5; info fieldValue.ceil();

    syntax-desc

    Returns the number by rounding it up to the next nearest greater integer.

    related-functions
    syntax

    <number / decimal>.ceil();

    tryout-desc

    Here 'ceil()' function converts a given number by rounding it up to the next nearest greater integer, hence it retruns '10'.

    isEven

    Returns true if field value/expression is even.

    Syntax

    <number>.isEven();

    Example

    info isEven(153480); /// Returns: true

    functionId tryout-example

    number = 200017; iseven = isEven(number); info iseven;

    syntax-desc

    Test whether given number is even or not. Throws error other than numbers.

    related-functions
    syntax

    <number>.isEven();

    tryout-desc

    Here the passed number value is odd. Hence this method will return 'false'.

    isOdd

    Returns true if field value/expression is odd.

    Syntax

    <number>.isOdd();

    Example

    info isOdd(153480); /// Returns: false

    functionId tryout-example

    number = 200017; odd = isOdd(number); info odd;

    syntax-desc

    Test whether given number is odd or not. Throws error other than numbers.

    related-functions
    syntax

    <number>.isOdd();

    tryout-desc

    Here the passed 'number' value is odd. Hence this method will return 'true'.

    log10

    Returns the base 10 logarithm value (Loge10) of the specified number.

    Syntax

    <number / decimal>.log10();

    Example

    info 81.log10(); /// Returns: 1.9084850188786497

    functionId tryout-example

    number=81; info number.log10();

    syntax-desc

    Returns base 10 logarithmic value of the given number (log10 of given number).

    related-functions
    syntax

    <number / decimal>.log10();

    tryout-desc

    Here the 'log10()' function returns base 10 logarithmic value of the given integer. It returns 1.9084850188786497.

date-time Functions
    addDay

    Returns a date-time value after adding the specified number of days.

    Syntax

    <date>.addDay(<number>);

    Example

    info '3-Oct-1993 12:24:36'.addDay(15); /// Returns: '18-Oct-1993 12:24:36'

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.addDay(10);

    syntax-desc

    Returns a date-time value after adding the specified number of days to the given date-time value.

    related-functions
    syntax

    <date>.addDay(<number>);

    tryout-desc

    Here 'addDay()' function adds the specified number of days '10' to the given date-time value '1-Jan-1990 20:50:36', hence it returns '11-Jan-1990 20:50:36'.

    addMonth

    Returns a date-time value after adding the specified number of months

    Syntax

    <date>.addMonth(<number>);

    Example

    info '25-Jan-1988 12:24:36'.addMonth(10); /// Returns: '25-Nov-1988 12:24:36'

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.addMonth(15);

    syntax-desc

    Returns a date-time value after adding the specified number of months to the given date-time value.

    related-functions
    syntax

    <date>.addMonth(<number>);

    tryout-desc

    Here 'addMonth()' function adds the specified number of months '15' to the given date-time value '1-Jan-1990 20:50:36', hence it returns '1-Apr-1991 20:50:36'.

    addYear

    Returns a date-time value after adding the specified number of years

    Syntax

    <date>.addYear(<number>);

    Example

    info '25-Jan-1988 12:24:36'.addYear(5); /// Returns: '25-Jan-1993 12:24:36'

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.addYear(15);

    syntax-desc

    Returns a date-time value after adding the specified number of Years to the given date-time value.

    related-functions
    syntax

    <date>.addYear(<number>);

    tryout-desc

    Here 'addYear()' function adds the specified number of Years '15' to the given date-time value '1-Jan-1990 20:50:36', hence it returns '1-Jan-2005 20:50:36'.

    addWeek

    Returns a date-time value after adding the specified number of weeks.

    Syntax

    <date>.addWeek(<number>);

    Example

    info '25-Jan-1988 12:24:36'.addWeek(5); /// Returns: '29-Feb-1988 12:24:36'

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.addWeek(15);

    syntax-desc

    Returns a date-time value after adding the specified number of Weeks to the given date-time value.

    related-functions
    syntax

    <date>.addWeek(<number>);

    tryout-desc

    Here 'addWeek()' function adds the specified number of Weeks '15' to the given date-time value '1-Jan-1990 20:50:36', hence it returns '16-Apr-1990 20:50:36'.

    getDay

    Returns the date of the month from the given date

    Syntax

    <date>.getDay();

    Example

    info '25-Jan-1988 12:24:36'.getDay(); /// Returns: 25

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.getDay();

    syntax-desc

    Returns the date from the given date-time value.

    related-functions
    syntax

    <date>.getDay();

    tryout-desc

    Here 'getDay()' function returns the date from the given date-time value, hence it returns '1'.

    getDayOfWeek

    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.

    Syntax

    <date>.getDayOfWeek();

    Example

    info '21-Aug-2013 16:04:37'.getDayOfWeek(); /// Returns: 4

    functionId tryout-example

    currentDate='25-May-1990 20:50:36'; info currentDate.getDayOfWeek();

    syntax-desc

    Returns the numeric value of number for day of the week for given date-time value ranging from 1 to 7.

    related-functions
    syntax

    <date>.getDayOfWeek();

    tryout-desc

    Here 'getDayOfWeek()' function returns the numeric value ranging 1-7 which represents the number of day of the week in the given year (25-May-1990 20:50:36), hence it returns 6.

    getMonth

    Returns the numerical value of the month from the specified date

    Syntax

    <date>.getMonth();

    Example

    info '25-Jan-1988 12:24:36'.getMonth(); /// Returns: 1

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.getMonth();

    syntax-desc

    Returns the numeric value of month from the given date-time value.

    related-functions
    syntax

    <date>.getMonth();

    tryout-desc

    Here 'getMonth()' function returns the numeric value of month from the given date-time value, hence it returns '1'.

    getWeekOfYear

    Returns a number in the range (1 - 52), representing the number of the week in the year. For example, "16/1/2007" returns 3..

    Syntax

    <date>.getWeekOfYear();

    Example

    info '25-Nov-1988 12:24:36'.getWeekOfYear(); /// Returns: 48

    functionId tryout-example

    currentDate='25-May-1990 20:50:36'; info currentDate.getWeekOfYear();

    syntax-desc

    Returns the numeric value of number for week for given date-time value ranging from 1 to 52.

    related-functions
    syntax

    <date>.getWeekOfYear();

    tryout-desc

    Here 'getWeekOfYear()' function returns the numeric value ranging 1-52 which represents the number of week in the given year (25-May-1990 20:50:36), hence it returns 21 means 21st week of given year.

    getYear

    Returns the numerical value of the year from the date specified.

    Syntax

    <date>.getYear();

    Example

    info '20-May-2013 16:04:37'.getYear(); /// Returns: 2013

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.getYear();

    syntax-desc

    Returns the value of year from the given date-time value.

    related-functions
    syntax

    <date>.getYear();

    tryout-desc

    Here 'getYear()' function returns the year from the given date-time value, hence it returns '1990'.

    subDay

    Returns a date-time value after subtracting the specified number of days.

    Syntax

    <date>.subDay(<number>);

    Example

    datetime = '21-Aug-2013 16:04:37'.subDay(3); info datetime; /// Returns: '18-Aug-2013 16:04:37'

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.subDay(15);

    syntax-desc

    Returns a date-time value after subtracting the specified number of days from the given date-time value.

    related-functions
    syntax

    <date>.subDay(<number>);

    tryout-desc

    Here 'subDay()' function subtracts the specified number of days '15' from the given date-time value '1-Jan-1990 20:50:36', hence it returns '17-Dec-1989 20:50:36'.

    subMonth

    Returns a date-time value after subtracting the specified number of months.

    Syntax

    <date>.subMonth(<number>);

    Example

    info '21-Aug-2013 16:04:37'.subMonth(3); /// Returns: '21-May-2013 16:04:37'

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.subMonth(15);

    syntax-desc

    Returns a date-time value after subtracting the specified number of months from the given date-time value.

    related-functions
    syntax

    <date>.subMonth(<number>);

    tryout-desc

    Here 'subMonth()' function subtracts the specified number of months '15' from the given date-time value '1-Jan-1990 20:50:36', hence it returns '01-Oct-1988 20:50:36'.

    subYear

    Returns a date-time value after subtracting the specified number of years.

    Syntax

    <date>.subYear(<number>);

    Example

    info '21-Aug-2013 16:04:37'.subYear(3); /// Returns: '21-Aug-2010 16:04:37'

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.subYear(15);

    syntax-desc

    Returns a date-time value after subtracting the specified number of years from the given date-time value.

    related-functions
    syntax

    <date>.subYear(<number>);

    tryout-desc

    Here 'subYear()' function subtracts the specified number of years '15' from the given date-time value '1-Jan-1990 20:50:36', hence it returns '01-Jan-1975 20:50:36'.

    subWeek

    Returns a date-time value after subtracting the specified number of weeks.

    Syntax

    <date>.subWeek(<number>);

    Example

    info '21-Aug-2013 16:04:37'.subWeek(3); /// Returns: '31-Jul-2013 16:04:37'

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.subWeek(15);

    syntax-desc

    Returns a date-time value after subtracting the specified number of weeks from the given date-time value.

    related-functions
    syntax

    <date>.subWeek(<number>);

    tryout-desc

    Here 'subWeek()' function subtracts the specified number of weeks '15' from the given date-time value '1-Jan-1990 20:50:36', hence it returns '18-Sep-1989 20:50:36'.

    addHour

    Returns a date-time value after adding the specified number of hours.

    Syntax

    <date>.addHour(<number>);

    Example

    info '21-Aug-2013 16:04:37'.addHour(3); /// Returns: '21-Aug-2013 19:04:37'

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.addHour(5);

    syntax-desc

    Returns a date-time value after adding the specified number of hours to the given date-time value.

    related-functions
    syntax

    <date>.addHour(<number>);

    tryout-desc

    Here 'addHour()' function adds the specified number of hours '5' to the given date-time value '1-Jan-1990 20:50:36', hence it returns '02-Jan-1990 01:50:36'.

    addMinutes

    Returns a date-time value after adding the specified number of minutes.

    Syntax

    <date>.addMinutes(<number>);

    Example

    info '21-Aug-2013 16:30:37'.addMinutes(20); /// Returns: '21-Aug-2013 16:50:37'

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.addMinutes(15);

    syntax-desc

    Returns a date-time value after adding the specified number of minutes to the given date-time value.

    related-functions
    syntax

    <date>.addMinutes(<number>);

    tryout-desc

    Here 'addMinutes()' function adds the specified number of minutes '15' to the given date-time value '1-Jan-1990 20:50:36', hence it returns '01-Jan-1990 21:05:36'.

    addSeconds

    Returns a date-time value after adding the specified number of seconds.

    Syntax

    <date>.addSeconds(<number>);

    Example

    info '21-Aug-2013 12:30:40'.addSeconds(10); /// Returns: '21-Aug-2013 12:30:50'

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.addSeconds(15);

    syntax-desc

    Returns a date-time value after adding the specified number of seconds to the given date-time value.

    related-functions
    syntax

    <date>.addSeconds(<number>);

    tryout-desc

    Here 'addSeconds()' function adds the specified number of seconds '15' to the given date-time value '1-Jan-1990 20:50:36', hence it returns '01-Jan-1990 21:05:51'.

    subHour

    Returns a date-time value after subtracting the specified number of hours.

    Syntax

    <date>.subHour(<number>);

    Example

    info '21-Aug-2013 16:04:37'.subHour(3); /// Returns: '21-Aug-2013 13:04:37'

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.subHour(5);

    syntax-desc

    Returns a date-time value after subtracting the specified number of hours from the given date-time value.

    related-functions
    syntax

    <date>.subHour(<number>);

    tryout-desc

    Here 'subHour()' function subtracts the specified number of hours '5' from the given date-time value '1-Jan-1990 20:50:36', hence it returns '01-Jan-1990 15:50:36'.

    subMinutes

    Returns a date-time value after subtracting the specified number of minutes.

    Syntax

    <date>.subMinutes(<number>);

    Example

    info '21-Aug-2013 16:10:00'.subMinutes(10); /// Returns: '21-Aug-2013 16:00:00'

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.subMinutes(5);

    syntax-desc

    Returns a date-time value after subtracting the specified number of minutes from the given date-time value.

    related-functions
    syntax

    <date>.subMinutes(<number>);

    tryout-desc

    Here 'subMinutes()' function subtracts the specified number of minutes '5' from the given date-time value '1-Jan-1990 20:50:36', hence it returns '01-Jan-1990 20:45:36'.

    subSeconds

    Returns a date-time value after subtracting the specified number of seconds.

    Syntax

    <date>.subSeconds(<number>);

    Example

    info '21-Aug-2013 16:10:20'.subSeconds(10); /// Returns: '21-Aug-2013 16:10:10'

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.subSeconds(15);

    syntax-desc

    Returns a date-time value after subtracting the specified number of seconds from the given date-time value.

    related-functions
    syntax

    <date>.subSeconds(<number>);

    tryout-desc

    Here 'subSeconds()' function subtracts the specified number of seconds '15' from the given date-time value '1-Jan-1990 20:50:36', hence it returns '01-Jan-1990 20:50:21'.

    addBusinessDay

    Returns the date after specified number of days from the given date.

    Syntax

    <date>.addBusinessDay(<number>);

    Example

    info '21-Aug-2013'.addBusinessDay(3); /// Returns: '26-Aug-2013'

    functionId tryout-example

    currentDate='1-Jan-1990'; info currentDate.addBusinessDay(10);

    syntax-desc

    Returns a date value after adding the specified number of working days to the given date.

    related-functions
    syntax

    <date>.addBusinessDay(<number>);

    tryout-desc

    Here 'addBusinessDay()' function adds the specified number of working days '10' to the given date value '1-Jan-1990', hence it returns '15-Jan-1990'.

    getDayOfYear

    Return a number in the range 1-365, representing the number of the day of the year, the specified date falls on.

    Syntax

    <date>.getDayOfYear();

    Example

    info '21-Aug-2013'.getDayOfYear(); /// Returns: 233

    functionId tryout-example

    currentDate='1-Feb-1990'; info currentDate.getDayOfYear();

    syntax-desc

    Returns the sequence number of the day of given year from the given date value.

    related-functions
    syntax

    <date>.getDayOfYear();

    tryout-desc

    Here 'getDayOfYear()' function returns number ranging from 1-365 thereby representing sequence number of the day of given year, hence it returns '32'.

    getHour

    Returns the hour value alone from the specified time.

    Syntax

    <date>.getHour();

    Example

    info '04-Jul-2013 16:01:46'.getHour(); /// Returns: 16

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.getHour();

    syntax-desc

    Returns the value of hour from the given date-time value.

    related-functions
    syntax

    <date>.getHour();

    tryout-desc

    Here 'getHour()' function returns the hour value from the given date-time value, hence it returns '20'.

    getMinutes

    Returns the minute value alone from the specified time

    Syntax

    <date>.getMinutes();

    Example

    info '04-Jul-2013 16:01:46'.getMinutes(); /// Returns: 1

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.getMinutes();

    syntax-desc

    Returns the value of minutes from the given date-time value.

    related-functions
    syntax

    <date>.getMinutes();

    tryout-desc

    Here 'getMinutes()' function returns the minutes value from the given date-time value, hence it returns '50'.

    getSeconds

    Returns the seconds value alone from the specified date/time

    Syntax

    <date>.getSeconds();

    Example

    info '04-Jul-2013 16:01:46'.getSeconds(); /// Returns: 46

    functionId tryout-example

    currentDate='1-Jan-1990 20:50:36'; info currentDate.getSeconds();

    syntax-desc

    Returns the value of seconds from the given date-time value.

    related-functions
    syntax

    <date>.getSeconds();

    tryout-desc

    Here 'getSeconds()' function returns the seconds value from the given date-time value, hence it returns '36'.

    hoursBetween

    Returns number of hours between the given start and end dates.

    Syntax

    <date>.hoursBetween(<date>);

    Example

    info '01-JAN-2015 01:58:01'.hoursBetween('02-JAN-2015 01:58:01'); /// Returns: 24

    functionId tryout-example

    date1 = '1-Jan-2019 00:00:00'; date2 = '1-Jan-2019 12:12:12'; info date1.hoursbetween(date2);

    syntax-desc

    Returns the difference of hours between the given start and end date-time values. If the start date-time is larger than the end date-time, the function returns a negative value.

    related-functions
    syntax

    <date>.hoursBetween(<date>);

    tryout-desc

    Here, the function -hoursbetween calculates and returns the number of hours between the dates 1-Jan-2019 00:00:00 and 1-Jan-2019 12:12:12. Hence, it returns 12.

    monthsBetween

    Returns a number in the range (1 - 11) representing the number of months between the given start and end dates.

    Syntax

    <date>.monthsBetween(<date>);

    Example

    info '04-Jul-2013'.monthsBetween('6-Jan-2014'); /// Returns: 6

    functionId tryout-example

    date1='1-Jan-1990'; date2='31-May-1990'; info date1.monthsBetween(date2);

    syntax-desc

    Returns a number which represents the number of months between two given dates.

    related-functions
    syntax

    <date>.monthsBetween(<date>);

    tryout-desc

    Here 'monthsBetween()' function calculates the number of months between two given dates and returns a numeric value, hence it retruns '5'(date2 - date1). If we reverse the values of date1 and date2, a negative value will be returned.

    yearsBetween

    Returns a number in the range (1 - ) representing the number of years between the given start and end dates.

    Syntax

    <date>.yearsBetween(<date>);

    Example

    info '04-Jul-2013'.yearsBetween('6-Jan-2017'); /// Returns: 3

    functionId tryout-example

    date1 = '1-Jan-1990'; date2 = '1-Jan-2000'; info date1.yearsBetween(date2);

    syntax-desc

    Returns a number which represents the number of years between two given dates.

    related-functions
    syntax

    <date>.yearsBetween(<date>);

    tryout-desc

    Here 'yearsBetween()' function calculates the number of years between two given dates and returns a numeric value, hence it retruns '10'(date2 - date1). If we reverse the values of date1 and date2, a negative value will be returned.

    eomonth

    Returns the last date of the month after adding/subtracting the specified number of months to the given month.

    Syntax

    <date>.eomonth(<number>);

    Example

    info '22-Oct-2015'.eomonth(3); /// Returns: '31-Jan-2016'

    functionId tryout-example

    currentDate='1-Jan-1990'; info currentDate.eomonth(5);

    syntax-desc

    Returns the last date of the month after adding/subtracting the specified number of months from the given date value. Addition/Subtraction of months depends on value given in the function.

    related-functions
    syntax

    <date>.eomonth(<number>);

    tryout-desc

    Here 'eomonth()' function adds/subtracts the specified number of months '5' from the given date value '1-Jan-1990' and returns last date of resulting month which is '30-Jun-1990'. To subtract the number of months, the month value should be given as negative (e.g. '-5').

    workday

    Returns the date after specified number of workdays

    Syntax

    <date>.workday(<number>);

    Example

    info '22-Oct-2015'.workday(3); /// Returns: '27-Oct-2015'

    functionId tryout-example

    currentDate='1-Jan-1990'; weekends={"SATURDAY","SUNDAY"}; info currentDate.workday(10,weekends);

    syntax-desc

    Returns a date value after adding the specified number of working days to the given date value.

    related-functions
    syntax

    <date>.workday(<number>);

    tryout-desc

    Here 'workday()' function adds the specified number of days '10' to the given date value '1-Jan-1990', hence it returns '15-Jan-1990'. Since "Saturdays" and "Sundays" are escaped. We can provide weekends list as optional arguments.

    weekday

    Returns a numeric value from range (1-7) representing current week's day

    Syntax

    <date>.weekday();

    Example

    info '17-sep-2015 12:23:11'.weekday(); /// Returns: 5

    functionId tryout-example

    currentDate='25-May-1990 20:50:36'; info currentDate.weekday();

    syntax-desc

    Returns the numeric value of number for the day of the week for given date-time value ranging from 1 to 7.

    related-functions
    syntax

    <date>.weekday();

    tryout-desc

    Here 'weekday()' function returns the numeric value ranging 1-7 which represents the number of day of the week in the given date (25-May-1990 20:50:36), hence it returns '6' means 'Friday'(Sunday is first day).

    toStartOfMonth

    Returns the starting date of the month, for a given date

    Syntax

    <date>.toStartOfMonth();

    Example

    info '21-Aug-2013'.toStartOfMonth(); /// Returns: '01-Aug-2013'

    functionId tryout-example

    fieldValue='31-Jan-1990'; info fieldValue.toStartOfMonth();

    syntax-desc

    Returns the starting date of the month mentioned in the given date.

    related-functions
    syntax

    <date>.toStartOfMonth();

    tryout-desc

    Here 'toStartOfMonth()' function will return the starting date of the month for the given date '31-Jan-1990', hence it returns '1-Jan-1990'.

    toStartOfWeek

    Returns the starting date of the week, for a given date

    Syntax

    <date>.toStartOfWeek();

    Example

    info '04-Jul-2013'.toStartOfWeek(); /// Returns: '30-Jun-2013'

    functionId tryout-example

    fieldValue='31-Jan-1990'; info fieldValue.toStartOfWeek();

    syntax-desc

    Returns the starting date of the week for a given date. First day is 'Sunday'.

    related-functions
    syntax

    <date>.toStartOfWeek();

    tryout-desc

    Here 'toStartOfWeek()' function returns the starting date of the week for a given date, hence it returns '28-Jan-1990'(First day is 'Sunday').

    yearfraction

    Returns the fraction of a year that is represented by the number of whole days between two supplied dates

    Syntax

    <date>.yearfraction(<date>);

    Example

    info '01/01/2015'.yearfraction('01/11/2015'); /// Returns: 0.0273972602739726

    functionId tryout-example

    date1='01/01/2015'; date2 = '03/01/2015'; yf = date1.yearfraction(date2); info yf;

    syntax-desc

    This function finds the number of days between two specified dates and divides it by 365.

    related-functions
    syntax

    <date>.yearfraction(<date>);

    tryout-desc

    The 'yearfraction' function, finds the number of days between the specified two dates - '01/01/2015 and '03/01/2015' and divides it by 365. The total number of days between the two dates is 59 (January - 31 days and February - 28 days). Hence, it returns the year fraction 0.16164383561643836 (i.e., 59/365).

    workdaysBetween

    calculates workingdays between the given start and end dates.

    Syntax

    <date>.workdaysBetween(<date>);

    Example

    info '04-Jan-2018'.workdaysBetween('9-Jan-2018'); /// Returns: 3

    functionId tryout-example

    date1='1-Jan-1990'; date2='25-Jan-1990'; info date1.workdaysBetween(date2);

    syntax-desc

    Returns a number which represents the number of workdays between two given dates.

    related-functions
    syntax

    <date>.workdaysBetween(<date>);

    tryout-desc

    Here 'workdaysbetween()' function calculates the number of workdays between two given dates and returns a numeric value, hence it returns '18'. If we reverse the values of date1 and date2, a negative value will be returned.

    daysBetween

    Returns a number in the range (1 - ) representing the number of days between the given start and end dates.

    Syntax

    <date>.daysBetween(<date>);

    Example

    info '04-Jul-2013'.daysBetween('10-Jul-2013'); /// Returns: 6

    functionId tryout-example

    date1='1-Jan-1990'; date2= '25-Jan-1990'; info date1.daysbetween(date2);

    syntax-desc

    Returns a number which represents the number of days between two given dates.

    related-functions
    syntax

    <date>.daysBetween(<date>);

    tryout-desc

    Here 'daysbetween()' function calculates the number of days between two given dates and returns a numeric value, hence it returns '24'. If we reverse the values of date1 and date2, a negative value will be returned.

    workdaysList

    calculates workingdays between the given start and end dates.

    Syntax

    <date>.workdaysList(<date>);

    Example

    info '04-Jan-2018'.workDaysList('9-Jan-2018'); /// Returns: Thu Jan 04 00:00:00 IST 2018,Fri Jan 05 00:00:00 IST 2018,Mon Jan 08 00:00:00 IST 2018,Tue Jan 09 00:00:00 IST 2018

    functionId tryout-example

    date1='4-Jan-2018'; date2='09-Jan-2018'; info date1.workdayslist(date2);

    syntax-desc

    Returns a list of days between two given dates.

    related-functions
    syntax

    <date>.workdaysList(<date>);

    tryout-desc

    It will return a list of dates.We assume Saturday & Sunday as weekends.However we can overwrite them.Also we can configure holidays like holidays = {'8-Jan-2018'}.

    getTime

    returns current time with AM/PM either in 24 or 12 hours format.

    Syntax

    <date>.getTime(<number>,<true/false>);

    Example

    info '17-Jan-2018 18:10:37'.getTime(12); /// Returns: 06:10 PM

    functionId tryout-example

    time = '17-Jan-2018 18:10:37'.getTime(12); info time; //returns 6:10 PM

    syntax-desc

    Returns the time extracted from a date object in user readable format. If the second parameter is true, the seconds is displayed (if present in the source date). If it is false, the seconds is hidden. If it is not specified, takes false by default.

    related-functions
    syntax

    <date>.getTime(<number>,<true/false>);

    tryout-desc

    Extracts the time from the given date object - 17-Jan-2018 18:10:37, and returns in 12 hours format. Hence, 06:10 PM is returned.

    getDate

    returns current date with AM/PM either in 24 or 12 hours format.

    Syntax

    <datetime>.getDate();

    Example

    info '17-Jan-2018 18:10:37'.getDate(); /// Returns: 17th January 2018

    functionId tryout-example

    currentDate = '17-Jan-2018 18:10:37'; info currentDate.getDate();

    syntax-desc

    Returns the date in a readable format from a date object.

    related-functions
    syntax

    <datetime>.getDate();

    tryout-desc

    getDate function displays date in a representable format than formal date

    getDateTime

    returns current time with AM/PM either in 24 or 12 hours format.

    Syntax

    <datetime>.getDateTime(<number>,<true/false>);

    Example

    info '17-Jan-2018 18:10:37'.getDateTime(); /// Returns: 17th January 2018,06:10 PM

    functionId tryout-example

    currentDate = '17-Jan-2018 18:10:37'; info currentDate.getDateTime(); //returns 17th January 2018,06:10 PM currentDate='17-Jan-2018 10:10:37'; info currentDate.getDateTime(12, true); // returns 17th January 2018,10:10:37 AM

    syntax-desc

    Returns the date and time in a readable format from a date object. The param represents the hours format and can either be 12 or 24. The param decides if the seconds value needs to be displayed. If this param is supplied with true, the seconds value is displayed. By default, this param is set as false.

    related-functions
    syntax

    <datetime>.getDateTime(<number>,<true/false>);

    tryout-desc

    getDateTime function displays date and time in a representable format.

    addBusinessHour

    Returns the date and time after specified number of working hours from the given date.

    Syntax

    <date>.addBusinessHour(<decimal | number>);

    Example

    info '04-Jan-2018'.addBusinessHour(20); /// Returns: 08-Jan-2018 13:00:00

    functionId tryout-example

    date1='8-Jan-2018 9:00'; info date1.addbusinesshour(20); ///returns '10-Jan-2018 13:00'

    syntax-desc

    Returns a date after adding number of working hours given.

    related-functions
    syntax

    <date>.addBusinessHour(<decimal | number>);

    tryout-desc

    Here 'addBusinessHour' function adds 20 working hours to the given date-time value '8-Jan-2018 9:00'. Hence, it returns '10-Jan-2018 13:00'.

collection Functions
    insert

    Inserts the values into collection

    Syntax

    <collection>.insert(<collection>);

    Example

    Items = Collection("Milk","Butter","Cheese"); Items.insert("Cream"); info Items; /// Returns: 'Milk, Butter, Cheese, Cream'

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","Product":"Creator"); product_Detail.insert("Plan":"Enterprise"); info product_Detail; products= Collection("Mail","Creator"); products.insert("CRM"); info products;

    syntax-desc

    Inserts new element in the Collection variable and returns the updated variable. Element passed in function should be of same type as existing elements in the variable.

    related-functions
    syntax

    <collection>.insert(<collection>);

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'insert()' allows you to insert new element in the Collection variable. Element passed in function should be of same type as existing elements in the variable. Hence it returns '{"company":"Zoho","Product":"Creator","Plan":"Enterprise"}'.

    insertAll

    Inserts mulitple values into collection

    Syntax

    <collection>.insertAll(<collection>);

    Example

    product_Detail= Collection("company":"Zoho","Product":"Creator"); product_Detail.insertAll({"Plan":"Enterprise","ExpiresOn":"2018"}); info product_Detail; /// Returns: {"company":"Zoho","Product":"Creator","Plan":"Enterprise","ExpiresOn":"2018"}

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","Product":"Creator"); product_Detail.insertAll({"Plan":"Enterprise","ExpiresOn":"2018"}); info product_Detail;

    syntax-desc

    Inserts set of new elements in the Collection variable and returns the updated variable. Elements passed in function should be of same type as existing elements in the variable.

    related-functions
    syntax

    <collection>.insertAll(<collection>);

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'insertAll()' allows you to insert set of new elements in the Collection variable. Elements passed in function should be of same type as existing elements in the variable. Hence it returns '{"company":"Zoho","Product":"Creator","Plan":"Enterprise","ExpiresOn":"2018"}'.

    update

    Updates the value in collection

    Syntax

    <collection>.update(<index | key>,<text>);

    Example

    Items = Collection("Milk","Butter","Cheese","Cream"); Items.update(3,"IceCream"); info Items;/// Returns: 'Milk, Butter, Cheese, IceCream'

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","Product":"Creator","Plan":"Enterprise"); product_Detail.update("Plan","Free"); info product_Detail;

    syntax-desc

    Updates an element in the Collection variable and returns the updated variable. Element passed in function should be of same type as existing elements in the variable.

    related-functions
    syntax

    <collection>.update(<index | key>,<text>);

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'update()' allows you to update an element in the Collection variable. Element passed in function should be of same type as existing elements in the variable. Hence it returns '{"company":"Zoho","Product":"Creator","Plan":"Free"}'.

    delete

    Removes a mentioned value and the key from the Collection variable

    Syntax

    <collection>.delete(<text>);

    Example

    Items = Collection("Milk","Cream","Butter","Cheese"); Items.delete("Cream"); info Items; /// Returns: 'Milk, Butter, Cheese'

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","Product":"Creator"); product_Detail.delete("Creator"); info product_Detail;

    syntax-desc

    Removes specific 'value' along with its 'key' from the Collection variable and returns the updated Collection variable.

    related-functions
    syntax

    <collection>.delete(<text>);

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'delete()' will remove specific value passed in the function, hence value "Creator" is removed and '{"company":"Zoho"}' is returned.

    deleteAll

    Removes multiple values and their keys from a Collection variable

    Syntax

    <collection>.deleteAll(<collection>);

    Example

    Items = Collection("Milk","Cream","Butter","Cheese"); Items.deleteAll("Cream","Cheese"); info Items; /// Returns: 'Milk, Butter'

    functionId tryout-example

    product_Detail = Collection("company":"Zoho","Product":"Creator"); items = Collection("Creator","Zoho"); product_Detail.deleteAll(items); info product_Detail;

    syntax-desc

    Removes multiple 'values' along with their 'keys' from the Collection variable and returns the updated Collection variable.

    related-functions
    syntax

    <collection>.deleteAll(<collection>);

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'deleteAll()' will remove multiple values passed as a list type collection in the function, hence values '"Product":"Creator"' and '"company":"Zoho"' is removed and '{}' is returned which denotes empty variable.

    deleteKey

    Removes a mentioned key and the value from the Collection variable

    Syntax

    <collection>.deleteKey(<text>);

    Example

    details = Collection("Name":"John","Age":23,"company":"Zoho"); details.deleteKey("Name"); info details; /// Returns: '{"Age":23,"company":"Zoho"}'

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","Product":"Creator"); product_Detail.deleteKey("Product"); info product_Detail;

    syntax-desc

    Removes specific 'key' along with its 'value' from the Collection variable and returns the updated Collection variable.

    related-functions
    syntax

    <collection>.deleteKey(<text>);

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'deleteKey()' will remove specific 'key' passed in the function along with its value, hence value '"Product":"Creator"' is removed and '{"company":"Zoho"}' is returned.

    deleteKeys

    Removes multiple keys and their values from a Collection variable

    Syntax

    <collection>.deleteKeys(<array>);

    Example

    details = Collection("Name":"John","Age":23,"company":"Zoho"); details.deleteKeys("Name","Age"); info details; /// Returns: '{"company":"Zoho"}'

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","Product":"Creator"); items = Collection("company","Product"); product_Detail.deleteKeys(items); info product_Detail;

    syntax-desc

    Removes multiple 'keys' along with their 'values' from the Collection variable and returns the updated Collection variable.

    related-functions
    syntax

    <collection>.deleteKeys(<array>);

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'deleteKeys()' will remove multiple 'keys' passed as a list type collection in the function, hence values '"Product":"Creator"' and '"company":"Zoho"' is removed and '{}' is returned which denotes empty variable.

    sort

    Updates the value in collection

    Syntax

    <collection>.sort(<true/false>);

    Example

    details = Collection("Name":"John","company":"Zoho"); details.sort(false); info details;/// Returns: '{"company":"Zoho","Name":"John"}'

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","Product":"Creator"); product_Detail.sort(true); info product_Detail;

    syntax-desc

    Rearranges the 'values' of the Collection variable alphabetically either in ascending/descending order (Depends on parameter passed).

    related-functions
    syntax

    <collection>.sort(<true/false>);

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'sort()' will sort elements according to 'values' in Collection variable in ascending(true)/descending(false) order, hence the sorted order will be '{"Product":"Creator","company":"Zoho"}'. 'true' and 'false' are the boolean value passed in 'sort()' function.

    sortKey

    Updates the value in collection

    Syntax

    <collection>.sortKey(<true/false>);

    Example

    details = Collection("Name":"John","Age":23,"Company":"Zoho"); info details.sortKey(false); /// Returns: '{"Name":"John","Company":"Zoho","Age":23}'

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","product":"Creator"); product_Detail.sortKey(true); info product_Detail;

    syntax-desc

    Rearranges the 'keys' of the collection variable alphabetically either in ascending or descending order based on the parameter passed. The sortKey() function arranges the keys in case-sensitive order. In other words, when keys are arranged in ascending order, the uppercase characters are sorted before the lowercase characters, i.e., the sorting is done based on ASCII values.

    related-functions
    syntax

    <collection>.sortKey(<true/false>);

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. However, the 'sortKey()' function is applied only to 'key-value' pair collection. The function sorts the elements according to the 'keys' of collection variable in ascending(true)/descending(false) order. Hence, the sorted order will be '{"company":"Zoho","product":"Creator"}'. 'true' and 'false' are the boolean values passed in 'sortKey()' function.

    clear

    Removes all values in collection

    Syntax

    <collection>.clear();

    Example

    details = Collection("Name":"John","Age":23,"company":"Zoho"); details.clear(); info details; /// Returns: '{}'

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","Product":"Creator"); product_Detail.clear(); info product_Detail;

    syntax-desc

    Removes all the elements from the Collection variable and returns an empty Collection variable.

    related-functions
    syntax

    <collection>.clear();

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'clear()' will remove all the key-values present in the Collection, hence '{}' is retruned.

    containsKey

    Checks for a specific key in collection

    Syntax

    <collection>.containsKey(<text>);

    Example

    details = Collection("Name":"John","Age":23,"company":"Zoho"); info details.containsKey("Age");/// Returns: 'true'

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","Product":"Creator"); result = product_Detail.containsKey("company"); info result;

    syntax-desc

    Returns 'true' if the mentioned key is present in the Collection variable. Otherwise it will return false.

    related-functions
    syntax

    <collection>.containsKey(<text>);

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'containsKey()' checks the 'key' passed in the function is present in the collection or not, hence 'true' is retruned.

    containsValue

    Checks for a specific value in collection

    Syntax

    <collection>.containsValue(<text>);

    Example

    details = Collection("Name":"John","Age":23,"company":"Zoho"); info details.containsValue("John"); /// Returns: 'true'

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","Product":"Creator"); result = product_Detail.containsValue("Zoho"); info result;

    syntax-desc

    Returns 'true' if the mentioned value is present in the Collection variable. Otherwise it will return false.

    related-functions
    syntax

    <collection>.containsValue(<text>);

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'containsValue()' checks the 'value' passed in the function is present in the collection or not, hence 'true' is retruned.

    getKey

    Gets key associated to specific value in collection

    Syntax

    <collection>.getKey(<text>);

    Example

    details = Collection("Name":"John","Age":23,"company":"Zoho"); info details.getKey("John"); /// Returns: 'Name'

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","Product":"Creator"); result = product_Detail.getKey("Zoho"); info result;

    syntax-desc

    Returns the 'key' associated with the 'value' passed in the function. Returns null if the value passed is not present.

    related-functions
    syntax

    <collection>.getKey(<text>);

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'getKey()' returns the 'key' of the 'value' passed in the function. Hence "company" is returned.

    getLastKey

    Gets the key associated to a specific value occurred at last in collection

    Syntax

    <collection>.getLastKey(<text>);

    Example

    details = Collection("Name":"John","Age":23,"company":"Zoho","product":"Zoho"); info details.getLastKey("Zoho");/// Returns: 'product'

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","Product":"Creator","Brand":"Zoho"); result = product_Detail.getLastKey("Zoho"); info result;

    syntax-desc

    Returns the 'key' associated with the 'value' occurred at last in the Collection variable. Returns null if the value passed is not present.

    related-functions
    syntax

    <collection>.getLastKey(<text>);

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'getLastKey()' returns the 'key' of the 'value' occurred at last in the Collection variable. Hence "Brand" is returned.

    isEmpty

    Check whether the Collection variable is empty or not

    Syntax

    <collection>.isEmpty();

    Example

    details = Collection("Name":"John","Age":23,"company":"Zoho"); info details.isEmpty(); /// Returns: 'false'

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","Product":"Creator"); result = product_Detail.isEmpty(); info result;

    syntax-desc

    Returns 'false' if Collection variable is not empty. Otherwise it will return false.

    related-functions
    syntax

    <collection>.isEmpty();

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'isEmpty()' checks the variable and returns 'true' if no values are present and 'false' if variable is not empty. Hence 'false' is returned.

    size

    Returns the number of values present in the variable

    Syntax

    <collection>.size();

    Example

    details = Collection("Name":"John","Age":23,"company":"Zoho"); info details.size(); /// Returns: '3'

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","Product":"Creator"); result = product_Detail.size(); info result;

    syntax-desc

    Returns number of 'key-values' or 'values' present in the variable. Returns '0' if variable is empty.

    related-functions
    syntax

    <collection>.size();

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'size()' returns number of 'key-values' or 'values' present in the variable. Hence '3' is returned.

    keys

    Returns a list of all the keys present in the variable

    Syntax

    <collection>.keys();

    Example

    details = Collection("Name":"John","Age":23,"company":"Zoho"); info details.keys(); /// Returns: 'Name,Age,company'

    functionId tryout-example

    product_Detail= Collection("Company":"Zoho","Product":"Creator"); result = product_Detail.keys(); info result;

    syntax-desc

    Returns the list containing all keys of the given Collection variable. Returns empty list if Collection variable contains nothing.

    related-functions
    syntax

    <collection>.keys();

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'keys()' returns the list containing all keys of the given Collection variable. Hence "Company, Product" is returned.

    values

    Returns a list of all the values present in the variable

    Syntax

    <collection>.values(<true/false>);

    Example

    details = Collection("Name":"John","Age":23,"company":"Zoho"); info details.values(); /// Returns: 'John , 23 , Zoho'

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","Product":"Creator"); result = product_Detail.values(); info result;

    syntax-desc

    Returns the list containing all values of the given Collection variable. Returns empty list if Collection variable contains nothing.

    related-functions
    syntax

    <collection>.values(<true/false>);

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'values()' returns the list containing all values of the given Collection variable. Hence "Zoho, Creator" is returned.

    distinct

    Returns a list of all distinct values present in Collection variable

    Syntax

    <collection>.distinct();

    Example

    Items = Collection("Milk","Butter","Cream","Cheese","Milk"); info Items.distinct(); /// Returns: 'Milk, Butter, Cream, Cheese'

    functionId tryout-example

    product_Detail= Collection("company":"Zoho","Product":"Creator","Brand":"Zoho"); result = product_Detail.distinct(); info result;

    syntax-desc

    Returns the list containing all "distinct values" of the given Collection variable. Returns empty list if Collection variable contains nothing.

    related-functions
    syntax

    <collection>.distinct();

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'distinct()' returns the list containing all "distinct values" of the given Collection variable. Hence "Creator, Zoho" is returned.

    intersect

    Returns a list of common elements present in two Collection variables

    Syntax

    <collection>.intersect(<collection>);

    Example

    Items_1 = Collection("Milk","Butter","Cream","Cheese"); Items_2 = Collection("Milk","Butter","Cheese"); info Items_1.intersect(Items_2); /// Returns: 'Butter, Cheese, Milk'

    functionId tryout-example

    product_Detail_1= Collection("ZohoCreator","ZohoCRM","ZohoBooks"); product_Detail_2= Collection("ZohoCreator","ZohoCRM","ZohoDesk"); result= product_Detail_1.intersect(product_Detail_2); info result;

    syntax-desc

    Returns the list containing all "common values" present in two given Collection variables. Does not work for key-value type variable.

    related-functions
    syntax

    <collection>.intersect(<collection>);

    tryout-desc

    Here the 'Collection()' function allows you to insert data as either 'key-value' pair or 'values' only. The function 'intersect()' returns the list containing all "common values" present in two given Collection variables. Hence "ZohoCreator,ZohoCRM" is returned.

    duplicate

    Returns a set of elements from any given Collection whose index is between start index, inclusive, and end index exclusive.

    Syntax

    <list>.duplicate(<number>,<number>);

    Example

    Items = Collection("Milk","Butter","Cream","Cheese"); info Items.duplicate(1,3); /// Returns: 'Butter, Cream'

    functionId tryout-example

    product_List = Collection("Cream","Milk","Butter","Cheese"); result = product_List.duplicate(1,2); info result;

    syntax-desc

    Returns set of elements of a given collection based on start and end index.

    related-functions
    syntax

    <list>.duplicate(<number>,<number>);

    tryout-desc

    Here product_List contains four values. The function 'duplicate()' will return the set of elements as list based on start and end indexes passed in the function, hence it returns {"Milk"}.

list Functions Deprecated
    contains

    Returns 'true' if the element is present in the list

    Syntax

    <list>.contains(<text>);

    Example

    colors = {"Red", "Blue", "Green", "Yellow"}; ret = colors.contains("Red"); info ret; /// Returns: true

    functionId tryout-example

    product_List={"Milk","Butter","Cream"}; info product_List.contains("Cream");

    syntax-desc

    Returns 'true' if the mentioned element is present in the list. Otherwise it returns 'false'.

    related-functions
    syntax

    <list>.contains(<text>);

    tryout-desc

    Here product_List contains three values. The function 'contains()' will check whether the element passed in the function is present in the list or not, hence it returns 'true'.If element is not present then it will return false.

    get

    Returns the String value at the specified index in list. Returns null if the list contains no value at the index specified.

    Syntax

    <list>.get(<number>);

    Example

    colors = {"Red", "Blue", "Green", "Yellow"}; ret = colors.get(2) ; info ret; /// Returns: "Green"

    functionId tryout-example

    product_List={"Milk","Butter","Cream"}; result = product_List.get(1); info result;

    syntax-desc

    Returns the value situated at given index of the list. Returns null for invalid index value.

    related-functions
    syntax

    <list>.get(<number>);

    tryout-desc

    Here the List 'product_List' has three values. On entering index in 'get()' function, it will return the corresponding value, hence it returns "Butter". Index value should not exceed size of the list or else it will return null.

    indexOf

    Returns the position of the given element in list (first element's position is '0')

    Syntax

    <list>.indexOf(<text>);

    Example

    colors = {"red", "blue", "green", "yellow"}; ret = colors.indexOf("green"); info ret; /// Returns: 2

    functionId tryout-example

    product_List={"Milk","Butter","Cream"}; result = product_List.indexOf("Butter"); info result;

    syntax-desc

    Returns the index of the value mentioned in the function.

    related-functions
    syntax

    <list>.indexOf(<text>);

    tryout-desc

    Here the List 'product_List' has three values. On entering value in 'indexOf()' function, it will return the corresponding index, hence it returns '1'. Value entered should be available in the given List, otherwise it will return -1.

    lastIndexOf

    Returns the position of the last occurence of the element in the list.

    Syntax

    <list>.lastIndexOf(<text>);

    Example

    list = {"red", "blue", "green", "red", "blue"}; ret = list.lastIndexOf("red"); info ret; /// Returns: 3

    functionId tryout-example

    product_List={"Milk","Butter","Cream","Milk","Butter"}; result = product_List.lastIndexOf("Butter"); info result;

    syntax-desc

    Returns the index of the value occurred at last in the list.

    related-functions
    syntax

    <list>.lastIndexOf(<text>);

    tryout-desc

    Here the List 'product_List' has five values. On entering value in 'lastIndexOf()' function, it will return the index occurred at last in the List, hence it returns '4'. Value entered should be available in the given List, otherwise it will return -1.

    remove

    Remove and return the element at the specified index (first element's index is '0')

    Syntax

    <list>.remove(<number>);

    Example

    list = {"red","blue","green"}; list.remove(2); info list; /// Returns: {"red","blue"}

    functionId tryout-example

    product_List={"Milk","Butter","Cream"}; result = product_List.remove(1); info product_List;

    syntax-desc

    Removes the value situated at the specified index of the List and updates the indices of the succeeding values.

    related-functions
    syntax

    <list>.remove(<number>);

    tryout-desc

    Here the List 'product_List' has three values. On entering index in 'remove()' function, it will remove the value at the specified index in the list and it updates the index of succeeding values in the list, hence the value "Butter" will be removed and the list now has only two values. Value entered should be available in the given List.

    removeElement

    Removes and returns the specified element from a list

    Syntax

    <list>.removeElement(<text>);

    Example

    list = {"red","blue","green"}; list.removeElement("blue"); info list;/// Returns: {"red","green"}

    functionId tryout-example

    product_List={"Milk","Butter","Cream"}; product_List.removeElement("Butter"); info product_List;

    syntax-desc

    Removes the specific element from the list if it is present in the given list.

    related-functions
    syntax

    <list>.removeElement(<text>);

    tryout-desc

    Here the List 'product_List' has three values. On entering value in 'removeElement()' function, it will remove the element, hence it will remove "Butter" from the list. Value entered should be available in the given List. If element is not found then list will remain unchanged.

    removeAll

    Removes all list2 elements present in list1

    Syntax

    <list1>.removeAll(<list2>);

    Example

    list={"Red","Blue","Green"}; temp={"Green","Blue"}; list.removeAll(temp); info list;/// Returns: {"Red"}

    functionId tryout-example

    product_List1={"Milk","Butter","Cheese","Cream"}; product_List2={"Milk","Cream"}; product_List1.removeAll(product_List2); info product_List1;

    syntax-desc

    Removes elements of list2 from list1 and returns the updated list.

    related-functions
    syntax

    <list1>.removeAll(<list2>);

    tryout-desc

    Here product_List1 and product_List2 contains 4 and 2 elements respectively. The function 'removeall()' will remove all elements of 'product_List2' from product_List1, hence it will return '{"Butter","Cheese"}.

    sort

    Returns the list in the sorted order. The optional boolean specifies ascending(true)/descending(false)

    Syntax

    <list>.sort(<true/false>);

    Example

    list = {"red", "blue", "green", "yellow"}; info list.sort(true); /// Returns: {"blue","green","red","yellow"}

    functionId tryout-example

    product_List={"Milk","Butter","Cream"}; info product_List.sort(true);

    syntax-desc

    Rearranges the elements of the list alphabetically either in ascending/descending order (Depends on parameter passed).

    related-functions
    syntax

    <list>.sort(<true/false>);

    tryout-desc

    Here product_List contains three values. The function 'sort()' will sort the elements of List in ascending(true)/descending(false) order, hence sorted list will be '{"Butter","Cream","Milk"}'. 'true' and 'false' are the boolean value passed in 'sort()' function.

    size

    Returns a number which represents the size of the given list.

    Syntax

    <list>.size();

    Example

    colors = {"Red", "Blue", "Green"}; ret = colors.size(); info ret; /// Returns: 3

    functionId tryout-example

    product_List={"Milk","Butter","Cream","Cheese"}; result = product_List.size(); info result;

    syntax-desc

    Returns the size of the given List.

    related-functions
    syntax

    <list>.size();

    tryout-desc

    Here product_List contains four values. The function 'size()' will return the number of elements present in the list, hence it will return '4'. If list is empty then '0' is returned.

    isEmpty

    Returns a Boolean value - True if the list contains no values; - false, if the list contains values

    Syntax

    <list>.isEmpty();

    Example

    colors = {"Red", "Blue", "Green"}; ret = colors.isEmpty(); info ret; /// Returns: false

    functionId tryout-example

    product_List={"Milk","Butter","Cream","Cheese"}; result = product_List.isEmpty(); info result;

    syntax-desc

    Returns 'true' if list is empty. Otherwise it will return 'false'.

    related-functions
    syntax

    <list>.isEmpty();

    tryout-desc

    Here product_List contains four values. The function 'isEmpty()' will return 'false' as 4 elements are present in the given list. If no element is present in the list then it will return 'true'.

    subList

    Returns a set of elements from any given list whose index is between start index, inclusive, and end index exclusive.

    Syntax

    <list>.subList(<number>,<number>);

    Example

    colors = {"red", "blue", "green", "yellow"}; list = colors.subList(1,3); info list; /// Returns: {"blue","green"}

    functionId tryout-example

    product_List={"Milk","Butter","Cream","Cheese"}; result = product_List.subList(1,2); info result;

    syntax-desc

    Returns set of elements of a given list based on start and end index.

    related-functions
    syntax

    <list>.subList(<number>,<number>);

    tryout-desc

    Here product_List contains four values. The function 'subList()' will return the set of elements as list based on start and end indexes passed in the function, hence it returns '{"Butter"}'.

    distinct

    Returns a specified list after removing all duplicate elements from it.

    Syntax

    <list>.distinct();

    Example

    colors = {"Red", "Green", "Green"}; list = colors.distinct(); info list;/// Returns: {"Red", "Green"}

    functionId tryout-example

    product_List={"Milk","Butter","Cream","Cheese","Milk","Butter"}; result = product_List.distinct(); info result;

    syntax-desc

    Removes all duplicate elements from the given list and returns a list with distinct elements.

    related-functions
    syntax

    <list>.distinct();

    tryout-desc

    Here product_List contains six values. The function 'distinct()' will remove all the duplicate elements from the list and return the list with distinct elements, hence it returns '{"Milk","Butter","Cream","Cheese"}'.

    intersect

    Returns a list with common elements in 2 given lists.

    Syntax

    <list1>.intersect(<list2>);

    Example

    colors = {"red", "blue", "green", "orange"}; fruits = {"apple","orange","banana"}; list = colors.intersect(fruits); info list;/// Returns: {"orange"}

    functionId tryout-example

    product_List1={"Milk","Butter","Cheese"}; product_List2={"Milk","Butter","Cream"}; result = product_List1.intersect(product_List2); info result;

    syntax-desc

    Returns a list which contains the common elements of both the lists.

    related-functions
    syntax

    <list1>.intersect(<list2>);

    tryout-desc

    The function 'intersect()' will return a list with the common elements present in both the lists, hence it returns '{"Butter", "Milk"}'. Returns an empty list if there are no common elements.

    add

    Adds the specified element at the last of the given list

    Syntax

    <list>.add(<anyType>);

    Example

    list = {"red", "blue", "green"}; list.add("yellow"); info list;/// Returns: {"red", "blue", "green", yellow};

    functionId tryout-example

    product_List={"Milk","Butter","Cream"}; product_List.add("Cheese"); info product_List;

    syntax-desc

    Adds the element to the list and returns the updated list.

    related-functions
    syntax

    <list>.add(<anyType>);

    tryout-desc

    Here product_List contains four values. The function 'add()' will add the mentioned element to the list, hence the element "Cheese" will be added to the list, hence it will return '{"Milk","Butter","Cream","Cheese"}'.

    addAll

    Adds all elements to list1 from list2

    Syntax

    <list1>.addAll(<list2>);

    Example

    list = {"red"}; morecolors = {"green","yellow"}; list.addAll(morecolors); info list;/// Returns: {"red","green","yellow"}

    functionId tryout-example

    product_List1={"Milk","Butter"}; product_List2={"Cheese","Cream","Bread"}; product_List1.addAll(product_List2); info product_List1;

    syntax-desc

    Returns a list which contains the elements of both the lists.

    related-functions
    syntax

    <list1>.addAll(<list2>);

    tryout-desc

    Here product_List1 and product_List2 contains 2 and 3 elements respectively. The function 'addAll()' will add the elements of both the list mentioned, hence it will return '{"Milk","Butter","Cheese","Cream","Bread"}.

    clear

    Removes all elements from the list

    Syntax

    <list>.clear();

    Example

    list = {"red", "blue", "green"}; list.clear(); info list;/// Returns: {}

    functionId tryout-example

    product_List={"Milk","Butter","Cream"}; product_List.clear(); info product_List;

    syntax-desc

    Removes all the elements from the list and returns an empty list.

    related-functions
    syntax

    <list>.clear();

    tryout-desc

    Here the List 'product_List' has three values. The function 'clear()' will remove all the values present in the list and return an empty list, hence '{}' is retruned.

    smallest

    Returns the smallest value of passed list

    Syntax

    <list>.smallest();

    Example

    price = {300,455,124,926,780}; ret = price.smallest(); info ret; /// Returns: "124"

    functionId tryout-example

    price = {300,455,124,926,780}; ret = price.smallest(); info ret;

    syntax-desc

    Returns the smallest value of a passed list

    related-functions
    syntax

    <list>.smallest();

    tryout-desc

    We arrange the passed list into ascending order and find the smallest one. Here price will be arranged as {124,300,455,780,926} and 124 is the smallest value.

    largest

    Returns the largest value of passed list

    Syntax

    <list>.largest();

    Example

    price = {300,455,124,926,780}; ret = price.largest(); info ret; /// Returns: "926"

    functionId tryout-example

    price = {300,455,124,926,780}; ret = price.largest(); info ret;

    syntax-desc

    Returns the max value of a passed list

    related-functions
    syntax

    <list>.largest();

    tryout-desc

    We arrange the passed list into ascending order and find the maximum value. Here price will be arranged as {124,300,455,780,926} and 926 is the largest value.

    average

    Returns the average of passed values

    Syntax

    <list>.average();

    Example

    price = {300,455,124,926,780}; ret = price.average(); info ret; /// Returns: "517"

    functionId tryout-example

    price = {300,455,124,926,780}; ret = price.average(); info ret;

    syntax-desc

    Returns the average of a passed list

    related-functions
    syntax

    <list>.average();

    tryout-desc

    Usual 'average' calculation. Sum all values of the list and divide by total number of elements. (300+455+124+926+780)/5=517

    percentile

    Returns the nth percentile value

    Syntax

    <list>.percentile(<number>);

    Example

    marks = {300,455,124,926,780}; ret = marks.percentile(50); info ret; /// Returns: "455"

    functionId tryout-example

    marks = {300,455,124,926,780}; ret = marks.percentile(50) ; info ret;

    syntax-desc

    Returns the nth percentile value of a passed list

    related-functions
    syntax

    <list>.percentile(<number>);

    tryout-desc

    Percentile calculation : Multiply percentile to be calculated number with the number of elements and divide the product by 100. Roundup to nearest whole number, call it as 'n'. Order the list in ascending. Find the n'th value from the list. Here 5X 50/100 = 2.5. Nearest whole number(n) is 3. So 455 is the 50th percentile.

    median

    Returns the median of passed values

    Syntax

    <list>.median();

    Example

    marks ={2,6,4}; ret = marks.median(); info ret; /// Returns: 4

    functionId tryout-example

    marks ={300,455,124,926,780,890}; ret = marks.median(); info ret;

    syntax-desc

    Returns the middlemost element of the specified collection of numbers. To get the median value, arrange the numbers in ascending/descending order. If the number of elements in the collection is even, the median is the average of the middle two elements. Otherwise, the middle element is the median of the collection.

    related-functions
    syntax

    <list>.median();

    tryout-desc

    On arranging the elements of the given collection in ascending order, we get {124,300,455,780,890,926}. Here, the middle values are: 455 and 780. The median is the average of the middle values, i.e., (455+780)/2. Hence, it returns 617.5.

    nthsmallest

    Returns the nthsmallest of passed values

    Syntax

    <list>.nthsmallest(<number>);

    Example

    marks = {300,455,124,926,780}; ret = marks.nthsmallest(2); info ret; /// Returns: "300"

    functionId tryout-example

    marks = {300,455,124,926,780}; ret = marks.nthsmallest(2); info ret;

    syntax-desc

    Returns the 'n'th smallest value of a passed list.

    related-functions
    syntax

    <list>.nthsmallest(<number>);

    tryout-desc

    Finds the n'th smallest number from the list after sorting them in ascending. Here 2nd smallest number from sorted list {124,300,455,780,926} is 300.

    nthlargest

    Returns the nthlargest of passed values

    Syntax

    <list>.nthlargest(<number>);

    Example

    marks = {300,455,124,926,780}; ret = marks.nthlargest(4); info ret; /// Returns: "300"

    functionId tryout-example

    marks = {300,455,124,926,780}; ret = marks.nthlargest(4); info ret;

    syntax-desc

    Returns the 'n'th largest value of a passed list.

    related-functions
    syntax

    <list>.nthlargest(<number>);

    tryout-desc

    Finds the n'th largest number from the list after sorting them in descending. Here 4th largest number from sorted list {124,300,455,780,926} is 300.

    rank

    Returns the rank of passed values

    Syntax

    <list>.rank(<number | decimal>,<text>);

    Example

    marks = {300,455,124,926,780}; ret = marks.rank(926); info ret; /// Returns: 1

    functionId tryout-example

    marks = {300,455,124,926,780}; ret = marks.rank(926); info ret; ret = marks.rank(926,"ASC"); info ret;

    syntax-desc

    Returns the rank of passed values in a list.

    related-functions
    syntax

    <list>.rank(<number | decimal>,<text>);

    tryout-desc

    Rank can be calculated by sorting list by ascending/descending order. In natural order rank(926) is 1 and in descending order ran(926) is 5.

key-value Functions Deprecated
    containKey

    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.

    Syntax

    <map>.containKey(<text>);

    Example

    map = {"1":"Red","2":"Blue"}; ret = map.containKey("1"); info ret;/// Returns: true

    functionId tryout-example

    product_Map={"company":"Zoho","Product":"Creator","ticket":"123456"}; info product_Map.containKey("Product");

    syntax-desc

    Returns 'true' if the mentioned key is present in the Map. Otherwise it returns 'false'.

    related-functions
    syntax

    <map>.containKey(<text>);

    tryout-desc

    Here product_Map contains three values. The function 'containsKey()' will check whether the key passed in the function is present in the Map or not, hence it returns 'true'.If the key is not present in Map then it will return false.

    containValue

    Returns a Boolean value - True, if this map maps one or more keys to the specified value; otherwise false

    Syntax

    <map>.containValue(<text>);

    Example

    map = {"1":"Red","2":"Blue"}; ret = map.containValue("Blue"); info ret;/// Returns: true

    functionId tryout-example

    product_Map={"company":"Zoho","Product":"Creator","ticket":"123456"}; info product_Map.containValue("Creator");

    syntax-desc

    Returns 'true' if the mentioned value is present in the Map. Otherwise it returns 'false'.

    related-functions
    syntax

    <map>.containValue(<text>);

    tryout-desc

    Here product_Map contains three values. The function 'containValue()' will check whether the value passed in the function is present in the Map or not, hence it returns 'true'.If value is not present then it will return false.

    get

    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 the specified key.

    Syntax

    <map>.get(<text>);

    Example

    map = {"1":"Red","2":"Blue"}; ret = map.get("2"); info ret;/// Returns: "Blue"

    functionId tryout-example

    product_Map={"company":"Zoho", "product":"Creator"}; result = product_Map.get("company"); info result;

    syntax-desc

    Returns the value associated to the mentioned key in the Map.

    related-functions
    syntax

    <map>.get(<text>);

    tryout-desc

    Here the map 'product_Map' has two key-value pairs. On entering key in 'get()' function, it will return the corresponding value, hence it returns "Zoho".

    isEmpty

    Returns a Boolean value - True if this map contains no key-value mappings; - false, if this map contains key-value mappings

    Syntax

    <map>.isEmpty();

    Example

    map = {"1":"Red","2":"Blue"}; ret = map.isEmpty(); info ret;/// Returns: false

    functionId tryout-example

    product_Map={"company":"Zoho","Product":"Creator","ticket":"123456"}; result = product_Map.isEmpty(); info result;

    syntax-desc

    Returns 'true' if Map is empty. Otherwise it will return 'false'.

    related-functions
    syntax

    <map>.isEmpty();

    tryout-desc

    Here product_Map contains three values. The function 'isEmpty()' will return 'false' as three elements are present in the given Map. If no element is present in the Map then it will return 'true'.

    keys

    Returns a List of the keys contained in this map.

    Syntax

    <map>.keys();

    Example

    map = {"1":"Red","2":"Blue"}; keyList = map.keys(); info keyList;/// Returns: {"1","2"}

    functionId tryout-example

    product_Map={"company":"Zoho","Product":"Creator","ticket":"123456"}; result = product_Map.keys(); info result;

    syntax-desc

    Returns the list containing all keys of the given Map.

    related-functions
    syntax

    <map>.keys();

    tryout-desc

    Here product_Map contains three values. The function 'keys()' will return a List containing all the keys of given Map, hence it returns '{"company","Product","ticket"}'. If Map is empty then returned list will also be empty.

    size

    Returns a number which represents the size of the given map.

    Syntax

    <map>.size();

    Example

    map = {"1":"Red","2":"Blue"}; ret = map.size(); info ret;/// Returns: 2

    functionId tryout-example

    product_Map={"company":"Zoho","Product":"Creator","ticket":"123456"}; result = product_Map.size(); info result;

    syntax-desc

    Returns the size of the given Map.

    related-functions
    syntax

    <map>.size();

    tryout-desc

    Here product_Map contains three values. The function 'size()' will return the number of elements present in the Map, hence it will return '3'. If list is empty then '0' is returned.

    put

    Add key-value pairs to specified Map

    Syntax

    <map>.put(<text1>,<text2>);

    Example

    map = {"1":"Red","2":"Blue"}; map.put("3","yellow"); info map; /// Returns: {"1":"Red","2":"Blue","3":"yellow"}

    functionId tryout-example

    product_Map={"company":"Zoho","Product":"Creator"}; product_Map.put("ticket","123456"); info product_Map;

    syntax-desc

    Add new key-value pair in the given Map.

    related-functions
    syntax

    <map>.put(<text1>,<text2>);

    tryout-desc

    Here product_Map contains two values. The function 'put()' will insert the key-value pair mentioned in the function into the given Map, hence the updated Map values will be '{"company":"Zoho","Product":"Creator","ticket":"123456"}'.

    putAll

    Add all key-value pairs to map1 from map2

    Syntax

    <map1>.putAll(<map2>);

    Example

    map = {"1":"Red","2":"Blue"}; temp={"3":"Green","4":"Yellow"}; map.putAll(temp); info map; /// Returns: {"1":"Red","2":"Blue","3":"Green","4":"Yellow"}

    functionId tryout-example

    product_Map1={"company":"Zoho","Product":"Creator"}; product_Map2={"ticket":"123456","year":"2015"}; product_Map1.putAll(product_Map2); info product_Map1;

    syntax-desc

    Puts all values of second Map into first Map.

    related-functions
    syntax

    <map1>.putAll(<map2>);

    tryout-desc

    Here product_Map1 and product_Map2 both contains two values each. The function 'putAll()' will insert all the elements of product_Map2 into product_Map1, hence the updated Map elements of product_Map1 will be {"company":"Zoho","Product":"Creator","ticket":"123456","year":"2015"}.

    remove

    Removes and returns the value mapped to the specified key from the map

    Syntax

    <map>.remove(<key>);

    Example

    map = {"1":"Read","2":"Blue"}; map.remove("1"); info map;/// Returns: {"2":"Blue"}

    functionId tryout-example

    product_Map={"company":"Zoho","Product":"Creator","ticket":"123456","year":"2015"}; product_Map.remove("Product"); info product_Map;

    syntax-desc

    Removes the value associated to the given key in the Map.

    related-functions
    syntax

    <map>.remove(<key>);

    tryout-desc

    Here the Map 'product_Map' has four values. On entering key in 'remove()' function, it will remove the value associated to the key in the Map, hence the key-value {"Product":Creator"} will be removed. Key entered should be available in the given Map.

    clear

    Removes all key-value pairs from the map

    Syntax

    <map>.clear();

    Example

    map = {"1":"Read","2":"Blue"}; map.clear(); info map;/// Returns: {}

    functionId tryout-example

    product_Map={"company":"Zoho","Product":"Creator","ticket":"123456","year":"2015"}; product_Map.clear(); info product_Map;

    syntax-desc

    Removes all the elements from the Map and returns an empty Map.

    related-functions
    syntax

    <map>.clear();

    tryout-desc

    Here the Map 'product_Map' has four values. The function 'clear()' will remove all the key-values present in the map and return an empty Map, hence '{}' is retruned.

common Functions
    isDate

    Returns true if field value/expression is a date.

    Syntax

    <text>.isDate();

    Example

    info '21-Aug-2011'.isDate(); /// Returns: true

    functionId tryout-example

    fieldValue="1-Feb-1990"; info fieldValue.isDate();

    syntax-desc

    Returns 'true' if a given value or expression is a date type. Otherwise it will return 'false'.

    related-functions
    syntax

    <text>.isDate();

    tryout-desc

    Here 'isDate()' function is used to check if a field value or expression is a date type or not, hence it retruns 'true'.

    isNull

    Returns true if field value/expression is null.

    Syntax

    <text>.isNull();

    Example

    info "".isNull(); /// Returns: true

    functionId tryout-example

    fieldValue="ZohoCreator"; info fieldValue.isNull();

    syntax-desc

    Returns 'true' if a given value or expression is null. Otherwise it will return 'false'.

    related-functions
    syntax

    <text>.isNull();

    tryout-desc

    Here 'isNull()' function is used to check if a field value or expression is null or not, hence it returns 'false'.

    isNumber

    Returns true if field value/expression is a number/decimal.

    Syntax

    <text/number>.isNumber();

    Example

    info 50.isNumber(); /// Returns: true

    functionId tryout-example

    fieldValue=100; info fieldValue.isNumber();

    syntax-desc

    Returns 'true' if a given value or expression is a number type. Otherwise it will return 'false'.

    related-functions
    syntax

    <text/number>.isNumber();

    tryout-desc

    Here 'isNumber()' function is used to check if a field value or expression is a number type or not, hence it retruns 'true'. For characters/special characters, it will return 'false'.

    isText

    Returns true if field value/expression is a string.

    Syntax

    <text/number>.isText();

    Example

    info "Zoho Creator".isText(); /// Returns: true

    functionId tryout-example

    fieldValue="Welcome to Zoho Creator"; info fieldValue.isText();

    syntax-desc

    Returns 'true' if a given value or expression is String type. Otherwise it will return 'false'.

    related-functions
    syntax

    <text/number>.isText();

    tryout-desc

    Here 'isText()' function is used to check if a field value or expression is String type or not, hence it retruns 'true'. For numeric values, it will return 'false'.

    isBlank

    Returns true if field value/expression is empty.

    Syntax

    <text>.isBlank();

    Example

    info " ".isBlank(); /// Returns: true

    functionId tryout-example

    fieldValue="Zoho"; info fieldValue.isBlank();

    syntax-desc

    Returns 'true' if a given value or expression is empty. Otherwise it will return 'false'.

    related-functions
    syntax

    <text>.isBlank();

    tryout-desc

    Here 'isBlank()' function is used to check if a given value or expression is empty, hence it retruns 'false'. For an empty field value or expression it will return 'true'.

    toText

    Converts and returns any given expression into string format

    Syntax

    <any-type>.toText();

    Example

    info 34512.toText(); /// Returns: "34512"

    functionId tryout-example

    product_quantity = 123456; result = product_quantity.toText(); info result;

    syntax-desc

    Converts the given expression into text format. Here expression can be of any data type.

    related-functions
    syntax

    <any-type>.toText();

    tryout-desc

    Here the expression '123456' will be converted to the text type, hence it will return "123456".

    toNumber

    Returns Long from given expression. The hexadecimal string should be preceded by '0x'. Eg "0x1F".toNumber() returns hexadecimal value of '1F'.

    Syntax

    <text/number>.toNumber();

    Example

    info "81.34".toNumber(); /// Returns: 81

    functionId tryout-example

    product_price = "12345.6"; result = product_price.toNumber(); info result;

    syntax-desc

    Converts the given expression into number format.

    related-functions
    syntax

    <text/number>.toNumber();

    tryout-desc

    Here the expression '12345.6' will be converted to the number type, hence it will return number value '12345' and built-in functions related to number can be applied now.

    text

    Converts format of specified argument 1 into format of specified argument 2

    Syntax

    <number>.text(<text>);

    Example

    info 123456.789.text("###,###.##"); /// Returns: "123,456.79"

    functionId tryout-example

    fieldValue=123456.789; info fieldValue.text("###,###");

    syntax-desc

    Converts the number into the specificed format and returns it as text.

    related-functions
    syntax

    <number>.text(<text>);

    tryout-desc

    Here 'text()' function converts the given value '123456' into mentioned format '###,###', hence it returns '123,456'.

    toDecimal

    Returns decimal value from given number/expression.

    Syntax

    <text/number>.toDecimal();

    Example

    info "81".toDecimal(); /// Returns: 81.00

    functionId tryout-example

    product_quantity = "123"; result = product_quantity.toDecimal(); info result;

    syntax-desc

    Converts the given expression into Decimal format. Here expression can be of any data type.

    related-functions
    syntax

    <text/number>.toDecimal();

    tryout-desc

    Here the expression "123" will be converted to the decimal type, hence it will return 123.00 and now built-in functions related to number type can be applied

    toDate

    Converts a date that is stored as text to a format that Zoho Creator recognizes as a date.

    Syntax

    <text/number>.toDate();

    Example

    info "20-May-2013".toDate(); /// Returns: '20-May-2013'

    functionId tryout-example

    dateString = "1-Jan-2015"; result = dateString.toDate(); info result;

    syntax-desc

    Converts the given date string expression into Date format.

    related-functions
    syntax

    <text/number>.toDate();

    tryout-desc

    Here the string expression "1-Jan-2015" will be converted to the Date type, hence it will return '1-Jan-2015' and now built-in functions related to date type can be applied

    toDateTime

    Converts a date-time that is stored as text to a format that Zoho Creator recognizes as a date-time value.

    Syntax

    <text/number>.toDateTime();

    Example

    info "20-May-2013".toDateTime(); /// Returns: '20-May-2013 00:00:00'

    functionId tryout-example

    dateString = "1-Jan-2015 20:30:54 Sunday"; result = dateString.toDateTime(); info result;

    syntax-desc

    Converts the given date-time string expression into Date-Time format.

    related-functions
    syntax

    <text/number>.toDateTime();

    tryout-desc

    Here the string expression "1-Jan-2015 20:30:54 Sunday" will be converted to the Date-Time type, hence it will return '1-Jan-2015 20:30:54' and built-in functions related to date type can be applied.

xml Functions
    executeXPath

    Returns the String from the applied xpath

    Syntax

    <XML/JSON text>.executeXPath(<xpath>);

    Example

    info "Zillium".executeXPath("/name/text()"); /// Returns: Zillium

    functionId tryout-example

    employeeDetail="EMP-001Developer"; employeeID = employeeDetail.executeXPath("/response/employee/id/text()"); info employeeID;

    syntax-desc

    Extracts the data from the given XML/JSON text based on the path mentioned. Path is the node/key name of the give xml/json text.

    related-functions
    syntax

    <XML/JSON text>.executeXPath(<xpath>);

    tryout-desc

    'employeeDetail' is a XML text which hold the employee details. The given path in executeXPath will extract the employee id out of the string.

  • text
  • number
  • date-time
  • collection
  • list [dep...]
  • key-value [dep...]
  • common
  • xml