Creator Help

Create a Row in Zoho Analytics

 Create a row in Zoho Analytics

You can use Zoho Creator Form to collect information and populate it in a Zoho Analytics table as a new row using createRow() Deluge task.


<return value as map> = zoho.reports.createRow(<DATABASE NAME>,<TABLE NAME>,<Field values as map>);

<return value> is the map object containing response returned by Zoho Analytics.
<Database Name> is the name of the database in Zoho Analytics,  where the record should be added.
<Table Name> is the name of the table in Zoho Analytics, where the record should be added.
<Field values> is the map variable that holds the key,value pairs. The map key is the column name of the table and the map value is the field value as submitted in the ZC form. For example, "Company" : input.Company_Name. Here, "Company" is the colum name of table mentioned as Table Name argument and input. Company_Name refers to the value specified in the Company_Name field in the Zoho Creator form.


Sample script to create a new row in Zoho Analytics. You can add the script to On Add -> On Success block of the form.

rowInfo = map();
rowInfo.put("Region", input.Region);
rowInfo.put("Product Category", input.Product_Category);
rowInfo.put("Product", input.Product);
rowInfo.put("Customer Name", input.Customer_Name);
rowInfo.put("Sales", input.Sales.toString());
rowInfo.put("Profit", input.Profit.toString());
rowInfo.put("Cost", input.Cost.toString());
mapResponse = zoho.reports.createRow(<DATABASE NAME>,<TABLE NAME>, rowInfo );

Code Explanation

rowInfo is the map variable that holds the key,value pairs.
mapResponse is the variable which holds the xml string returned by Zoho Analytics.

 Related Links

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: