Choose where you’d like to start

Update Records in Zoho Creator

Overview

The zoho.creator.updateRecords task is used to update all records that satisfy criteria in the specified Zoho Creator application.

Note: This integration task is based on the Zoho Creator - Update Records API.

Syntax

<variable> = zoho.creator.updateRecords(<owner_name>, <app_link_name>, <report_link_name>, <criteria>, <new_input_values>, <other_api_params>, <connection_link_name>);

where:

ParameterData TypeDescription
<variable>KEY-VALUEVariable that will hold the details of the updated records.
<owner_name>TEXT

Name of the owner of the app in which the records need to be updated.

Note:

Name of the application owner can be fetched in the following ways:

  • From the URL of the application while editing or accessing it. The URL is in the format: app.zohocreator.com/appbuilder/<application_owner>/...
  • By using the system variable - zoho.adminuser
    • To improve email deliverability, we will be following Gmail's updated sender email policy starting from February 1, 2024. This means that Gmail addresses cannot be used as a sender address in the send mail tasks.Learn More
<app_link_name>TEXT

Link name of the application whose records need to be updated.

Note:

Link name of the application can be fetched in the following ways:

  • From the URL of the application while editing or accessing it. The URL is in the format: app.zohocreator.com/appbuilder/<application_owner>/<application_name>/...
  • By using the system variable -  zoho.appname
  • Link names of applications, reports, and fields in your account can also be viewed on the reference page (listed in brackets).
<report_link_name>TEXT

Link name of the report whose records needs to be updated.

Note:

  • Link names of applications, reports, and fields in your account can be viewed on the reference page (listed in brackets).
  • You can also fetch link names from the URL while accessing the report. The URL is in the format: app.zohocreator.com/appbuilder/<application_owner>/<application_name>/#Report:<report_link_name>
<criteria>TEXT

The condition that should be satisfied by records in order to be updated with new values.

Note: 

  • Click here to learn more about defining search criteria.
  • To update all records, specify the criteria as ID!=0 or ID!=null.
  • If your search condition contains hard-coded string value, it needs to be enclosed in double-quotes escaped with backslashes. For example, the search condition, "Task_Name==Service Task" should be provided as "Task_Name==\"Service Task\"".
<new_input_values>KEY-VALUE

Supply input field values as a KEY-VALUE collection. The keys to this parameter are the field link names and the values are their corresponding input values.

Note:

<other_api_params>KEY-VALUE

Other optional parameters specified in Zoho Creator Update Records API document.

Note: To skip this parameter, provide an empty map as its value.
<connection_link_name>TEXT

Link name of the connection created and connected to your Zoho Creator account. 

Note:

Example 1

The following example updates all the records that has "priority" as value against the "type" field with the specified values. This example sets the optional parameters tasks and message as true so the success response will include success message and the details of the form, report, page, or URL to which the target form is configured to redirect to upon successful form submission.

 // Create a KEY-VALUE variable to hold the new record values
                 dataMap = Map();
                 dataMap.put("Task_Name", "Priority Task");
                 // Create a KEY-VALUE variable to hold optional parameters
                 otherParams = Map();
                 otherParams.put("message", true);
                 otherParams.put("tasks", true);
                 // Write update record integration task
                 response = zoho.creator.updateRecords("Shawn","Task_Management","All_Tasks","(type.contains(\"Priority\"))", dataMap, otherParams, "creator_oauth_connection");
                

where:

response
The KEY-VALUE variable that holds the response of the task
"Shawn"
The TEXT value that represents the name of the application owner.
"Task_Management"
The TEXT value that represents the link name of the application.
"All_Tasks"
The TEXT value that represents the link name of the application.
"(type.contains(\"Priority\"))"
The TEXT that represents the search criteria.
dataMap
The KEY-VALUE variable that holds the new input values.
otherParams
The KEY-VALUE variable that holds the optional parameters.

Example 2

The following example updates all the records in the form - Tasks of the Zoho Creator application - Task_Management with the specified input value.

 // Create a KEY-VALUE variable to hold the new record values
                 dataMap = Map();
                 dataMap.put("Task_Name", "New Task");
                 // Create an empty KEY-VALUE variable to skip other_api_params parameter
                 otherParams = Map();
                 // Write update record integration task
                 response = zoho.creator.updateRecords("Shawn","Task_Management","All_Tasks", "ID!=0", dataMap, otherParams, "creator_oauth_connection");
                

Response Format

Success Response

  • The successful response will be returned in the following format:

     {
     "result": [
     {
     "code": 3000,
     "data": {
     "ID": "3893272000000038043"
     },
     "message": "Data Updated Successfully"
     },
     {
     "code": 3000,
     "data": {
     "ID": "3893272000000038047"
     },
     "message": "Data Updated Successfully"
     },
     {
     "code": 3000,
     "data": {
     "ID": "3893272000000190003"
     },
     "message": "Data Updated Successfully"
     }
     ],
     "code": 3000  }

Failure Response

  • The failure response for incorrect or non-existent application name will be returned in the following format

     {
     "code": 2892,
     "message": "No application named <application_name> found. Please check and try again."
    }
  • The failure response for incorrect owner name will be returned in the following format

     {
     "code": 1110,
     "message": "No workspace named <owner_name> found. Please enter a valid workspace value."
    }
  • The failure response for incorrect or non-existent report name will be returned in the following format

     {
     "code": 2894,
     "message": "No report named <report_link_name> found. Please check and try again."
    }
  • The failure response for incorrect or non-existent record ID will be returned in the following format:

     {
     "code": 3100,
     "message": "No Data Available"
    }

Related Links

Get Started Now

Execute