Type check functions

Type check functions

isDate

The isDate() function takes an expression as an argument, and returns true if it is a valid date-time value. Otherwise, it returns false.    

Return Type

BOOLEAN

Syntax

  1. <variable> = isDate(<expression> );
(or)
  1. <variable> = <expression>.isDate();

Examples

  1. dateString="01-Jan-2019";
  2.  dateValue='01-Jun-2020';
  3.  numValue=100;
  4.  
  5.  boolValOne=isDate(dateString);//returns true
  6.  boolValTwo=isDate(numValue);// returns false
  7.  boolValThree=dateValue.isDate();// returns true

isFile

The isFile function takes a file object as an argument and returns true if it is a valid file. Otherwise, it returns false.

Note:
  1. The file object should be available in the cloud.
  2. Offline files are not supported.

Return Type

BOOLEAN

Syntax

  1. <variable>=<file_object>.isFile();
(OR)
  1. <variable>=isFile(<file_object>);
where,

Examples

  1.  file_object=invokeUrl
  2.  [
  3.      url:"http://www.thenonlinearpath.com/wp-content/uploads/2016/05/GoodVibesOnly.png"
  4.      type:GET
  5.  ];
  6.  if(file_object.isFile()){
  7.      // Do something
  8.  }

isNumber

The isNumber() function takes an expression as an argument, and returns true if it is a valid numerical value. Otherwise, it returns false.   

Return Type

Boolean

Syntax

  1. <variable> = isNumber( <expression> );
(or)
  1. <variable> = <expression>.isNumber();
  1. Valid numerical values in single or double quotes will return true.
  2. List and Key-value data type will always return a null value.

Examples

  1.  numValue=isNumber("12.3");// returns true
  2.  numValue="1".isNumber();// returns true
  3.  numValue=24.isNumber();// returns true
  4.  numValue=(24/2*10).isNumber();// returns true
  5.  numValue="24/2*10".isNumber();// returns false

isText

The isText() function takes an expression as an argument, and returns true if it is a valid text value. Otherwise, it returns false.   

Return Type

BOOLEAN

Syntax

<variable> = isText( <expression> );

Examples

  1.  textValue=isText("Hello");//returns true
  2.  numberText=isText("123");//returns false
  3.  dateText='01-02-2020'.isText();//returns false
  4.  empty=isText("");  ​//returns true

    Zoho CRM Training Programs

    Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

    Zoho CRM Training
      Redefine the way you work
      with Zoho Workplace

        Zoho DataPrep Personalized Demo

        If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

        Zoho CRM Training

          Create, share, and deliver

          beautiful slides from anywhere.

          Get Started Now


            Zoho Sign now offers specialized one-on-one training for both administrators and developers.

            BOOK A SESSION








                                    You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                        Manage your brands on social media

                                          Zoho Desk Resources

                                          • Desk Community Learning Series


                                          • Digest


                                          • Functions


                                          • Meetups


                                          • Kbase


                                          • Resources


                                          • Glossary


                                          • Desk Marketplace


                                          • MVP Corner


                                          • Word of the Day


                                            Zoho Marketing Automation

                                              Zoho Sheet Resources

                                               

                                                  Zoho Forms Resources


                                                    Secure your business
                                                    communication with Zoho Mail


                                                    Mail on the move with
                                                    Zoho Mail mobile application

                                                      Stay on top of your schedule
                                                      at all times


                                                      Carry your calendar with you
                                                      Anytime, anywhere




                                                            Zoho Sign Resources

                                                              Sign, Paperless!

                                                              Sign and send business documents on the go!

                                                              Get Started Now




                                                                      Zoho TeamInbox Resources



                                                                              Zoho DataPrep Resources



                                                                                Zoho DataPrep Demo

                                                                                Get a personalized demo or POC

                                                                                REGISTER NOW


                                                                                  Design. Discuss. Deliver.

                                                                                  Create visually engaging stories with Zoho Show.

                                                                                  Get Started Now









                                                                                                      • Related Articles

                                                                                                      • Functions

                                                                                                        This guide helps you with the following: Create Functions  Normal Functions REST API Functions Invoke Functions  Edit Functions  Delete Functions Rest API Functions Authentication Version 2.0 Version 1.0 Example Comparison of Version 2.0 and 1.0 ...
                                                                                                      • Custom Functions

                                                                                                        The guide will help you with the following: Create Custom Functions Program Custom Functions  Test Custom Functions  Associate with Workflow Rules  Manage Custom Functions  Custom functions help in automation where procedural logic is required, which ...
                                                                                                      • Type conversion functions

                                                                                                        toDate The toDate function takes an expression as an argument, and returns the expression (containing a date-time value) in the date format as specified in application settings.  This function takes an optional argument dateTimeMapping when the given ...
                                                                                                      • Automation - Setting up Custom Functions

                                                                                                        This guide will help you with the following: Create Custom Functions Program Custom Functions  Test Custom Functions  Associate with Workflow Rules  Manage Custom Functions  Custom functions help in automation where procedural logic is required, ...
                                                                                                      • Logical Functions

                                                                                                        The guide helps you with the following: 1. Difference between isBlank(), isNull() and isEmpty() functions 2. Equals 3. isBlank 4. isEmpty 5. isNull 6. isValidObject Difference between isBlank(), isNull() and isEmpty() functions The table below lists ...
                                                                                                        Wherever you are is as good as
                                                                                                        your workplace

                                                                                                          Resources

                                                                                                          Videos

                                                                                                          Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                          eBooks

                                                                                                          Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                          Webinars

                                                                                                          Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                          CRM Tips

                                                                                                          Make the most of Zoho CRM with these useful tips.



                                                                                                            Zoho Show Resources