what is the two dots for in your code ".. ORDER BY INDEX"?
so can you show an example of your code? i'm not so sure if the problem lies with ver 9.3.1 or ver 10.. the problem lies with the version of the API... I'm using v2.2 of the Javascript API .... here's my code and it just dies at the "query.where" line...if i take out the ".. ORDER BY" and just use query.where = "ACTIVE = 'Y'" then it works without a hitch var queryTask = new esri.tasks.QueryTask(serviceURL + "/" + index); var query = new esri.tasks.Query(); query.returnGeometry = false; query.outFields = ["INDEX", "ADDRESS", "ZIP"]; query.where = "ACTIVE = 'Y'.. ORDER BY INDEX"; queryTask.execute(query,queryResults);
var queryTask = new esri.tasks.QueryTask(serviceURL + "/" + index); var query = new esri.tasks.Query(); query.returnGeometry = false; query.outFields = ["INDEX", "ADDRESS", "ZIP"]; query.where = "ACTIVE = 'Y'.. ORDER BY INDEX"; queryTask.execute(query,queryResults);
I used ORDER BY in you code a couple of times and I have no problem with it. It is an added feature on 9.3.1. I don't see why it would not work on 10...
So has anyone confirmed that this works? I'm trying this and it doesn't seem to work.
Try this: query.where = " your where clause.. ORDER BY SHAPE.LEN"; Note: only work on 9.3.1 above
Is there a way to order QueryTask results?I have a query and query tasks setup to return a featureset of polylines and I'd like to have them ordered by shape.len. Is that possible?Thanks.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.