List Manipulations

List Manipulations

The Create List Deluge syntax enables the creation of new list. A new list can be created in two ways:
  1. Using constructor.
  2. Using list functions that return list values as output / or by direct assignment of one list to another.

Using constructor

A constructor is a special syntax provided to create a list. These constructors also supports special qualifiers that enables the creation of specific list like string-list or date-list that accepts only string or date type values respectively. A constructor enables the creation of both empty list and also list with some initial values. The constructors for creating a list variable are given below:
  1. {} - Holds list values of any type. Handy syntax for creating list with some initial values.
  2. List() - Holds list values of any type.
  3. List:String() - Holds list values of type String.
  4. List:Int() - Holds list values of type Integer.
  5. List:Date() - Holds list values of type Date.
  6. List:Bool() - Holds list values of type Boolean - true/false.
  7. List:Float() - Holds list values of type Float.

Using list functions that return list values as output / or by direct assignment of one list to another

A new list can be created by using methods like sublist(), toList() etc. that return a list as output. You can also create a new list by directly assigning an already defined list to it. In these cases, the new list created is usually not empty.

Syntax
  1. <listname> = <listexpression/constructor>;
where,
  1. <listname> - any user-defined name can be specified as list name.
  2. <listexpression/constructor> - the expression, value or list constructor to initialize the list.
Example
In the following sample code, a List named list1 of type String is defined in the on add -> on load block and initialized with the List:String() constructor.
  1. list1 = List:String();
In the following sample code,
- a string list named list2 is defined in the on add -> on load block and initialized with string values.
- a general list named list3 is defined in the on add -> on load block and initialized with string and number values.

  1. list2 = List:String({"hockey", "cricket", "football", "tennis"});
  2. list3 = {1, 2, 3, 4, "party"};
In the following sample code, a string list named list4 is defined and initialized with the Deluge expression input.Country+input.Name
  1. list4 = List:String({input.Country + ", " + input.Name}); }

    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

                                                                                                      • List Manipulations - Create list

                                                                                                        This guide will help you with the following: 1. Overview 2. Syntax 3. Example Overview The create list deluge task is used to declare a list variable. Syntax To declare a list variable <variable> = List();​ To declare a list variable with a string ...
                                                                                                      • List Manipulations - Clear

                                                                                                        This guide will help you with the following: 1. Overview 2. Syntax 3. Example Overview The clear deluge task empties a specified list by permanently removing all its elements. Syntax <list_variable>.clear(); This task can be used in the following ...
                                                                                                      • List Manipulations - For each

                                                                                                        This guide will help you with the following: 1. For each element Overview Syntax Example Example 1: Iterate through a list Example 2: Send mail for every iteration 2. For each index Overview Syntax Example For each element Overview The for each ...
                                                                                                      • List Manipulations - Add Operation

                                                                                                        This guide will help you with the following: 1. Overview 2. Syntax 3. Examples Overview The add deluge task is used to add elements to an existing list. Syntax <list_variable>.add( <expression> ); This task can be used in the following events ...
                                                                                                      • List Manipulations - Sort

                                                                                                        This guide will help you with the following: Overview Return Syntax Example Overview The sort deluge task sorts the elements of a list, in an ascending order if the specified boolean value is true, or in descending order if the specified boolean ...
                                                                                                        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