AnsweredAssumed Answered

How to Query a flat table in JavaScript API

Question asked by shaikhrizuan on Aug 22, 2016
Latest reply on Aug 22, 2016 by shaikhrizuan



I want to query a flat table present in SQLdatabase from JavaScript API. I have published the map service including the flat table and got the REST URL. When i query the table, i am not able to see any field attributes or values. Below is the code:


var queries = [];
var queryTask = new QueryTask("");
var query = new Query();
query.where = "OBJECTID = 4";
query.outFields = ["TABLENAME", "FIELDNAME", "VALUEINFO"];
query.returnGeometry = true;
var iPromises = new all(queries);
iPromises.then(lang.hitch(this, function (r) {
      r.length // coming length as One but not able to see field values

Also find screen-shot for the same:


Any idea.. how to get the field values.???



Shaikh Rizuan