Data Access - Update records

Data Access - Update records

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

Overview

The update records deluge task updates(replaces) the value of a specified field with the given value.
Records need to be fetched before they can be updated.

Syntax

To update a field value in the first record in the collection variable:
  1. <collection_variable>.<field_link_name> = <expression>;
To update a field value in every record in a collection:
  1. for each <loop_variable> in <collection_variable>;
  2. {
  3. <loop_variable>.<field_link_name> = <expression>;
  4. }



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.

Things to keep in mind

While using the first syntax, if the collection variable holds multiple records, the field value in the first added record only will updated.
This task can be used in the following events

Example

The following script fetches record with "Employee ID" field value as 9021, and updates the "Name" field value to "Harry John".
  1. EmployeeDetails = Employees [ Employee_ID == 9021 ];
  2. EmployeeDetails.Name.first_name = "Harry" ;

    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 - 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 - 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 - Add Records

                                                                                                    This guide will help you with the following: Overview Return Syntax Things to keep in mind Applicable data-type and expression for each field Example Overview The add record deluge task creates a new record with given values in the specified form. ...
                                                                                                  • 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