Hi,
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("https://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServe...");
var query = new Query();
query.where = "OBJECTID = 4";
query.outFields = ["TABLENAME", "FIELDNAME", "VALUEINFO"];
query.returnGeometry = true;
queries.push(queryTask.execute(query));
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.???
Regards,
Shaikh Rizuan
Solved! Go to Solution.
I would just query WHERE 1=1 I don't see an Object ID of 4 in the data and set the OutFields to be ["*"].
That should give you some results to play with.
Drew
Have you tried the query using the fields aliases i.e. "Field Name", "Table Name" etc?
Its working, When i tried with different field names.. other than ObjectID
Anyways thanks Basson..
I would just query WHERE 1=1 I don't see an Object ID of 4 in the data and set the OutFields to be ["*"].
That should give you some results to play with.
Drew