Data Access - Add Records

Data Access - Add Records

This guide will help you with the following:
  1. Overview
  2. Return
  3. Syntax
  4. Things to keep in mind
  5. Applicable data-type and expression for each field
  6. Example

Overview

The add record deluge task creates a new record with given values in the specified form.

Return

This task returns the ID of the created record. It is of NUMBER data type.

Syntax

  1.  <variable>  =  insert into <form_link_name>
  2.  [
  3.      <field_link_name>=<expression>
  4.      <field_link_name>=<expression>
  5.      <field_link_name>=<expression>
  6.  ];

Things to keep in mind

  1. Scripts written in the On Validate and On Success workflow section of the form specified in "Add Record" task will not be executed.
  2. If a field is not specified in the "Add Record" task, and that field has "Initial value" property defined, the value will be assigned to that field by default.
  3. If "No Duplicate Values" is selected, and a duplicate value is specified in the "Add Record" task, the script execution will fail.

Applicable data type and expression for each field

1.
Field Type: Name
Data type: Text
Points Note:
  1. You must specify only the link name of the "Name" field when assigning it a value copied from another "Name" field.
  2. In all other cases, you have to give the values for its sub-fields separately as given below:
  3. <field>.prefix: denotes the "prefix" field.
  4. <field>.first_name: denotes the "first_name" field.
  5. <field>.last_name: denotes the "last_name" field.
  6. <field>.suffix: denotes the "suffix" field.
  7. You can add the above mentioned sub-fields even if they are not selected in the field's property.
Note:
If more than one Name fields are present in the form, the link names of the subsequent name sub fields will be appended by a number starting from 1. So, if we take the example of the subfield <field>.prefix, the link name of the first such field will be <field>.prefix, the link name of the second such field will be <field>.prefix1, the link name of the third such field will be <field>.prefix2, and so on.

2.
Field Type: Email
Data type: Text
Points Note
  1. The format of the specified email address must be valid. If the format of the specified email address is invalid, execution will be stopped during runtime.
  2. The number of characters in the value should not exceed the length specified in the "Character maximum" field property. If it exceeds, execution will be stopped during run-time.
3. 
Field Type: Address
Data type: Text
Points Note:
  1. You must specify only the link name of the "Address" field when assigning it a value copied from another "Address" field.
  2. In all other cases, you have to give values for its sub-fields separately as given below:
  3. <field>.address_line_1: denotes the "Address Line 1" field.
  4. <field>.address_line_2: denotes the "Address Line 2" field.
  5. <field>.district_city: denotes the "City / District" field.
  6. <field>.state_province: denotes the "State / Province" field.
  7. <field>.postal_Code: denotes the "Postal Code" field.
  8. <field>.country: denotes the "Country" field.
  9. <field>.longitude: denotes the "longitude" field.
  10. <field>.latitude: denotes the "latitude" field.
  11. You can add the above mentioned sub-fields even if they are not selected in the field's property.
Note:
If more than one address fields are present in the form, the link names of the subsequent address sub fields will be appended by a number starting from 1. So, if we take the example of the subfield <field>.country, the link name of the first such field will be <field>.country, the link name of the second such field will be <field>.country1, the link name of the third such field will be <field>.country2, and so on.

4.
Field Type: Phone
Data type: Text
Points Note:
  1. Value can be specified with or without the country code, even if the "Country code options" and "Default country code" field properties are not selected.
  2. Special characters like (), and - are supported to accept different phone number formats of various countries.

5.
Field Type: Single
Data type: Text
Points Note:
  1. The number of characters in the value should not exceed the length specified in the "Character maximum" field property. If it exceeds, execution will be stopped during run-time.

6.
Field Type: Multi-line
Data type: Text
Points Note
  1. The value can be plain text of maximum 64 kb size.

7. 
Field Type: Number
Data type: Number
Points Note
  1. If the number of digits specified in the value exceeds the length specified in the "Max Digits" field property, the extra digits will be trimmed from the right.

8.
Field Type: Date
Data type: Date-Time
Points Note
  1. All days in a week can be specified as value, irrespective of the selected days in "Allowed Days" property.
  2. Time value, if specified, will not get added.
9. 
Field Type: Time
Data type: Time
Points Note:
  1. Values ranging from 0 to 23 hours will be accepted for 24-hour format. Values ranging from 0 to 12 hours will be accepted for 12-hour format.
  2. Date value, if specified, will not get added. 

10. 
Field Type: Drop-down
Data type: Text
Points Note
  1. You can specify a new choice apart from pre-defined choices even if the "Allow Other Choice" field property is not selected.
  2. If a new choice is specified as the value, it only gets saved in the record and is not added as a new choice to be selected from the form UI. And that choice cannot be retrieved back if modified.

11. 
Field Type: Radio
Data type: Text
Points Note
  1. You can specify a new choice apart from existing choices even if the "Allow Other Choice" field property is not selected.
  2. If a new choice is specified as the value, it only gets saved in the record and is not added as a new choice to be selected from the form UI. And that choice cannot be retrieved back if modified.

12. 
Field Type: Multi Select
Data type: List
Points Note
  1. You can specify a new choice apart from the pre-defined choices.
  2. If a new choice is specified as the value, it only gets saved in the record and is not added as a new choice to be selected from the form UI. And that choice cannot be retrieved back if modified.

13. 
Field Type: Checkbox
Data type: List
Points Note
  1. You can specify a new choice apart from the pre-defined choices.
  2. If a new choice is specified as the value, it only gets saved in the record and is not added as a new choice to be selected from the form UI. And that choice cannot be retrieved back if modified.

14. 
Field Type: Decision box
Data type: Boolean
Points Note
  1. You can specify the value as True or False, with or without double quotes.
  2. If any other value is specified, execution will be stopped during run time.

15. 
Field Type: Rich Text
Data type: Text
Points Note:
  1.  There is no limit to the number or type of characters that can be specified as the value.

16. 
Field Type: URL
Data type: Text
Points Note
  1. Value can be specified in any of the the following formats:
    1. HTML text format: <a href= \"<URL>\" title = \"<TITLE>\" target = \"_blank\"><linkname></a> where: title, link name and target are optional params
    2. Plain text format: URL as such can be provided as a text enclosed with double quotes.
Note: Plain text format can be used only in the "On success", "On create", "On edit", and "On create or edit" workflow events.

17. 
Field Type: Image
Data type: Text
Points Note
  1. Value must be specified in the following format (title, linkname and target are optional params) :
  2. <a href= \"http://<LINKNAME>\" title =\"<TITLE>\" target = \"_blank\"><img src = \"<URL>\" title =\"<TITLE>\"></img></a>
  3. You must specify the image url as the value, even if the "Browse Options -Link" field property is not selected.
  4. The link must be that of a public image

18. 
Field Type: Percent
Data type: Decimal
Points Note
  1. If the number of digits specified in the value exceeds the length specified in the "Max Digits" field property, the extra digits will be trimmed from the right.
  2. If the specified decimal points exceed the number specified in "Decimal Points" field property, the extra decimal points will be trimmed from the right. 

19. 
Field Type: Currency
Data type: Decimal
Points Note
  1. If the number of digits specified in the value exceeds the value specified in the "Max Digits" field property, the extra digits will be trimmed from the right.
  2. If the specified decimal points exceed the number specified in "Decimal Points" field property, the extra decimal points will be trimmed from the right. 

20.
Field Type: Decimal
Data type: Decimal
Points Note
  1. If the number of digits specified in the value exceeds the value specified in the "Max Digits" field property, the extra digits will be trimmed from the right.
  2. If the specified decimal points exceed the number specified in "Decimal Points" field property, the extra decimal points will be trimmed from the right.

21.
Field Type: Date-Time
Data type: Date-Time
Points Note
  1. All days and hours can be specified as value, irrespective of the selected days and hours in "Allowed Days" and "Allowed Hours" property.
  2. If time value is not specified, 00:00:00 will be set as the time value.

22.
Field Type: Lookup(Display type - Dropdown/Radio Button)
Data type: Number
Points Note
  1. You must specify the record ID of the lookup form as the value.

23.
Field Type: Lookup(Display type - Multi Select/Checkbox)
Data type: List
Points Note
You must specify the record ID of the lookup form as the value.

24.
Field Type: File-upload
Data type: File-upload
Points Note
  1. Only a file value fetched from another File Upload field type should be specified as a value.

25.
Field Type: Audio
Data type: Audio
Points Note
  1. Only an audio file value fetched from another Audio field type should be specified as a value.

26.
Field Type: Video
Data type: Video
Points Note
  1. Only an video file value fetched from another Video field type should be specified as a value.

27.
Field Type: Users
Data type: Text
Points Note
  1. You can specify username of any user or developer added in your current app.
  2. You can view the list of users and developers in your account by navigating to Settings > Users. From this page, you can also add more users and developers to your account.
  3. If you enter an incorrect username, execution will be stopped during run-time.

28.
Field Type: Integration (Zoho CRM)
Data type: Text
Points Note
  1. You must specify the record ID in the selected module as the value. If you enter an incorrect ID, execution will be stopped during run-time.  

29.
Field Type: Integration (Zoho Recruit)
Data type: Text
Points Note
  1. You must specify the record ID in the selected module as the value. If you enter an incorrect ID, execution will be stopped during run-time.

30.
Field Type: Integration (Salesforce)
Data type: Text
Points Note
  1. You must specify the record ID in the selected module as the value. If you enter an incorrect ID, execution will be stopped during run-time.

31.
Field Type: Integration (Zoho Books)
Data type: Text
Points Note
  1. You must specify the record ID in the selected module as the value.
  2. If you enter an incorrect ID, execution will be stopped during run-time.

32. 
Field Type: Integration (Quickbooks)
Data type: Text
Points Note
  1. You must specify the record ID in the selected module as the value.
  2. If you enter an incorrect ID, execution will be stopped during run-time.

This task can be used in the following events

Example

  1.  insertintoEvents // Events is the form link name
  2.  [
  3.      Added_User=zoho.loginuser
  4.      Name.prefix="Mr"
  5.      Name.first_name="Harry"
  6.      Name.last_name="John"
  7.      Name.suffix="Jr"
  8.      Email="harry.john@abc.com"
  9.      Address.address_line_12="Zoho Corporation"
  10.      Address.address_line_22="4141 Hacienda Drive"
  11.      Address.district_city2="Pleasanton"
  12.      Address.state_province2="California"
  13.      Address.postal_code2="94588"
  14.      Address.country2="USA"
  15.      Address.longitude2="30.219231"
  16.      Address.latitude2="-97.750838"
  17.      Phone="+18778344428"
  18.      Event_name="Workshops"// Event_name is a single line field type
  19.      Event_details="Workshops will be held for Zoho Creator as part of a two day program"// Event_details is a multi line field type
  20.      Number_of_attendees=350// Number_of_attendees is a number field type
  21.      Date_of_registration='05-Jul-2018'// Date_of_registration is a date field type 
  22.      Type_of_workshop="Free"// Type_of_workshop is a drop-down field type
  23.      Event_approval="Pending"// Project_approval is a radio field type
  24.      Venue={"USA","Australia"}// Venue is a multi-select field type
  25.      Required_equipment={"iPhone","Macbook","AppleTV"}// Required_equipment is a checkbox field type
  26.      Read_privacy_policy=True// Read_privacy_policy is a decision field type
  27.      Rich_Text="Harry John"
  28.      Registration_url="www.zoho.com/register"// Registration_url is a url field type
  29.      Previous_year_turnout=99.2// Previous _year_turnout is a percent field type
  30.      Event_expense=5000// Event_expense is a currency field type
  31.      Decimal=100.4
  32.      Event_start_date='04-Jul-2018 08:00:00'// Event_start_date is a date-time field type
  33.      Lookup_Dropdown="1754388000001023025"
  34.      Lookup_Checkbox={"1754388000001023025","1754388000001029087"}
  35.      Script=rec.Audio// Script is an audio field type and rec is a fetched record
  36.      Dry_run=rec.Video// Dry_run is a video field type and rec is a fetched record
  37.      Event_emcee="jameswilliams"// Event_emcee is a users field type
  38.      Zoho_CRM="00190000010bRIMAA2"// Zoho_CRM is an integration field type
  39.      ];

    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







                                                                                            You are currently viewing the help articles of Sprints 1.0. If you are a user of 2.0, please refer here.

                                                                                            You are currently viewing the help articles of Sprints 2.0. If you are a user of 1.0, please refer here.



                                                                                                  • Related Articles

                                                                                                  • Data Access - Update records

                                                                                                    This guide will help you with the following: Overview Syntax Applicable data-type and expression for each field Things to keep in mind Example Overview The update records deluge task updates(replaces) the value of a specified field with the given ...
                                                                                                  • Data Access - Delete records

                                                                                                    This guide you with the following: Overview Syntax Things to keep in mind Examples Overview The delete record deluge task deletes a form's records which meet a given criteria. The criteria is mandatory. Syntax delete from ...
                                                                                                  • Data Access - Fetch Records

                                                                                                    This guide will help you with the following: Overview Return Syntax Things to keep in mind Examples Overview The fetch record deluge task retrieves records from a specified form, when a given criteria is met. The criteria is mandatory. Note: The ...
                                                                                                  • Data Access - Collection variable

                                                                                                    This guide will help you with the following: Overview Declaring a collection variable Aggregate functions Fetch field value from the first record Fetch values of a field from all the records in a collection Updating field value in a collection ...
                                                                                                  • Data Access - Criteria to fetch records

                                                                                                    This guide will help you with the following: 1. Overview 2. Syntax 3. Applicable operators for different datatypes Overview A criteria is required when you need to fetch a collection of records. Criteria comprises of one or more conditions separated ...
                                                                                                    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