I am using an identify task on layers in a dynamic map service, and displaying the results in a popup. I have nearly identical code working perfectly for another service, but with this case, the only the template I defined shows in the popup. The identify does not seem to be pulling the attribute values to populate the fields in the popup. Any suggestions?ETA: here is a fiddle.function mapReady(map){ on(map,"Click",executeIdentifyTask); //create identify tasks and setup parameters identifyTask = new esri.tasks.IdentifyTask("http://nmbbmapping.org/arcgis/rest/services/casa/MapServer/"); identifyParams = new esri.tasks.IdentifyParameters(); identifyParams.tolerance = 10; identifyParams.returnGeometry = true; identifyParams.layerIds = [1,16]; identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_ALL; identifyParams.width = map.width; identifyParams.height = map.height; } function executeIdentifyTask(evt) { identifyParams.geometry = evt.mapPoint; identifyParams.mapExtent = map.extent; var deferred = identifyTask.execute(identifyParams); deferred.addCallback(function(response) { // response is an array of identify result objects // Let's return an array of features. return dojo.map(response, function(result) { var feature = result.feature; feature.attributes.layerName = result.layerName; if(result.layerName === 'Public Schools K12'){ //console.log(feature.attributes.PARCELID); var template = new PopupTemplate ({ title: "Public Schools K12", //description: , fieldInfos: [{ // define field infos to specify alias fieldName: "INST_NAME", visible: true, label: "Institution Name: " }, { fieldName: "ADDRESS", visible: true, label: "Address: " }, { fieldName: "CITY", visible: true, label: "City: " }] }); feature.setInfoTemplate(template); } else if (result.layerName === 'Non Government Community Support'){ //console.log(feature.attributes.PARCELID); var template = new PopupTemplate ({ title: "Non Government Community Support", //description: , fieldInfos: [{ // define field infos to specify alias fieldName: "INST_NAME", visible: true, label: "Institution Name: " }, { fieldName: "ADDRESS", visible: true, label: "Address: " }, { fieldName: "CITY", visible: true, label: "City: " }] }); feature.setInfoTemplate(template); } return feature; }); }); map.infoWindow.setFeatures([ deferred ]); map.infoWindow.show(evt.mapPoint); }