Function Using Query and QueryTask

672
0
04-07-2014 09:24 AM
MichaelVolz
Esteemed Contributor
I am taking an ESRI Javascript sample of a QueryTask where I have 2 different queries.  The URL of the sample is below;

https://developers.arcgis.com/javascript/jssamples/query_nomap.html

function (Query, QueryTask, dom, on) {

        var queryTask = new QueryTask("http://server/arcgis/rest/services/OpLayers_D/MapServer/21");

        var query = new Query();
        query.returnGeometry = false;
        query.outFields = [
          "MUNI_NAME", "MUNI_TYPE", "MUNI_NAME_FULL" //, "MUNI_NUM", "FIPS_MUNI"
        ];

I have just tried to copy this function and modify the variables queryTask to queryTaskRd and query to queryRd, as well as the mapservice URL and outFields, but the original query no longer works.

Does anyone know what would cause the original query to no longer work?

Do I need to update the function somehow (Query, QueryTask, dom, on)  for the 2nd query?  (e.g. Can I not use Query and QueryTask again without remaining these parameters)

Any help or hints are greatly appreciated.
0 Kudos
0 Replies