Error while getting values to a dropdown from Reports table through api call.......
Hello
I have a problem in fetching data from reports in dropdownfield in a stateless form , i m getting this error ("unable in executing set variable task and error evaluating string expression ,invalid xml/json format")
i have attached the same code below <with wrong password and username and api>
// Gets the authentication for your account.
ticketDetails = getUrl(("https://accounts.zoho.com/login?servicename=ZohoReports&FROM_AGENT=true&LOGIN_ID=123456&PASSWORD=abcd"));
ticket = (ticketDetails.toString()).subString(((ticketDetails).indexOf("TICKET=") + 7),((ticketDetails).indexOf("RESULT") - 1));
query = "select Distinct(in_dial_code) from number_management";
url = "http://reports.zoho.com/api/tarun123456/xls/?ZOHO_ACTION=EXPORT&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=XML&ZOHO_API_KEY=3dfdfdf63dfddf7014b67577f7&ticket=" + ticket + "&ZOHO_API_VERSION=1.0&ZOHO_SQLQUERY=" + query;
// Invoking Zoho Reports Export API and parsing the data.
response = getUrl(url);
result = response.executeXPath("/root/response/result/rows/text()");
clear in_dial_code; //(in_dial_code is the ID of the DD)
// Loading the fetched distinct values in the drop-down item "Dial code"
in_dial_code:ui.add(result.toList("-|-"));
// Adds this new data list to your drop-down option.