Copy Formula


Copy Formula


The Copy Formula API is used to copy one or more formula columns from one table to another within the same database or across databases and even across one user account to another. The source database administrator should generate and provide the Copy Database Key, the secret key used to authorize the destination database administrator. It is necessary that the table and column name in the destination database should be the same as that of the table and column names in the source database on which the formula is dependent. Both Custom Formula and Aggregate Formula can be copied using this API.

Getting Started

It is recommended to go through the Zoho Reports API Prerequisites before using Copy Formula API.


The sample request URL is below.

Query String Parameters

The below table shows the list of Query String parameters that has to be passed along with the request URL.

Parameter NameDescription
ZOHO_ACTIONThis parameter value should be COPYFORMULA

This parameter should be in the same case(UPPER CASE) as given in this document.
ZOHO_FORMULATOCOPYThis parameter holds the FORMULA NAME to be copied from the source database into another table in the destination database. In case more than one formulas are to be copied, the formula names should be separated by comma ( , ).

ZOHO_DATABASE_NAMEThis parameter holds the name of the database (destination database) where the destination table is present. The specified formula are copied to the table which has same name (SourceEmployeeDetails) as specified in the API URL
ZOHO_COPY_DB_KEYThe secret key used for allowing the user to copy the database / reports. The source database owner has to invoke the below URL to get the Copy Database Secret Key.

Note: You need to provide the appropriate values in the above URL to generate the corresponding Copy Database Key for your setup

The authtoken parameter should hold the Auth Token of the Destination Database Owner Account.


The sample response sent from the server if the Copy Formula process is successful.

XML Format:

<response uri="/api/" action="COPYFORMULA">
<message>Successfully formula(s) Copied</message>

JSON Format:

                         "message": "Successfully Formula(s) Copied"

Error Handling

This section explains about the error response sent from the Zoho Reports server on failure of Copy Formula API. The sample error response is below.

XML Format:

<response uri="/api/" action="COPYFORMULA">
<error>  <code>15009</code>
<message>The formula 'MyFormula1' is already copied to the destination table 'SourceEmployeeDetails' of database '3835000001921187'.</message>

JSON Format:

": "\/api\/\/SourceEmployeeDB\/SourceEmployeeDetails",
{ "code":15009,
: "The formula 'MyFormula1' is already copied to the destination table 'SourceEmployeeDetails' of database '3835000001921187'."

Error Codes:

The below table shows the list of error codes sent from server on Copy Report API Request along with the reason and the solution for the same.

Error CodeReasonSolution
15000A table into which the formula is to be copied is missing in the destination databaseCheck the destination database and create / copy the missing table / query table
A column which is needed to copy the formula is missing in the destination database
Check the destination database and create the necessary columns before copying the formula
A formula column which is needed to copy the specified formula column is missing in the destination databaseCheck the destination database and create / copy the required formula column before copying the specified formula column
15007Insufficient privileges to copy the reportCheck whether the Copy Database Key is valid
The formula column name specified already exists in the destination database
Check whether the formula column is already copied, otherwise, try renaming the formula column in the source table or in the destination database and invoke the API again
The Formula Column name specified in the API request is not present in the Source Database
Check the formula column name(s) specified in the ZOHO_FORMULATOCOPY parameter is correct

In case you encounter any other errors, please mail the API request URL parameters and error response details to We will get back to you shortly with the best possible solution.

    Post a comment

    Your Name or E-mail ID (mandatory)

    Note: Your comment will be published after approval of the owner.

     RSS of this page