Hi all,
Is it possible to use the API to retrieve one column in Zoho Report to update a drop down/lookup field in Zhoho?
I tried to use the API with tickets, but I am not able to achieve this.
I followed the post here, but got Invalid XML/JSON format alert.
ticketDetails = getUrl(("https://accounts.zoho.com/login?servicename=ZohoReports&FROM_AGENT=true&LOGIN_ID=
<your username>
&PASSWORD=
<your password>
"));
ticket = (ticketDetails.toString()).subString(((ticketDetails).indexOf("TICKET=") + 7),((ticketDetails).indexOf("RESULT") - 1));
query = "select Product from Products";
//Sample Query
url = ((("http://reports.zoho.com/api/
<ZOHO USERNAME>
/
<DATABASE NAME>
/
<TABLE NAME>
?ZOHO_ACTION=EXPORT&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=XML&ZOHO_API_KEY=493ac846aaf440ed9b5c040865b2e076&ticket=") + ticket) + "&ZOHO_API_VERSION=1.0&ZOHO_SQLQUERY=") + query;
response = getUrl(url);
result = response.executeXPath("/root/response/result/rows/text()");
clear Product;
//Clearing the existing values in the field
Product:ui.add(result.toList("-|-"));
//Adding the response values to the field
Thank you so much!