Solved! Go to Solution.
operationalLineLayer.selectFeatures(selectQuery, esri.layers.FeatureLayer.SELECTION_NEW, function(features) { if (features[0].attributes["STATUS2013"] == 'Not Complete') { //store the current feature updateFeature = features[0]; updateFeature.attributes["STATUS2013"] = 'Complete'; updateFeature.getLayer().applyEdits(null, [updateFeature], null); } else (features[0].attributes["STATUS2013"] == 'Complete') { //store the current feature updateFeature = features[0]; updateFeature.attributes["STATUS2013"] = 'Not Complete'; updateFeature.getLayer().applyEdits(null, [updateFeature], null); } else { map.infoWindow.hide(); } });
operationalLineLayer.selectFeatures(selectQuery, esri.layers.FeatureLayer.SELECTION_NEW, function(features) { if (features[0].attributes["STATUS2013"] == 'Not Complete') { //store the current feature updateFeature = features[0]; updateFeature.attributes["STATUS2013"] = 'Complete'; updateFeature.getLayer().applyEdits(null, [updateFeature], null); } else (features[0].attributes["STATUS2013"] == 'Complete') { //store the current feature updateFeature = features[0]; updateFeature.attributes["STATUS2013"] = 'Not Complete'; updateFeature.getLayer().applyEdits(null, [updateFeature], null); } else { map.infoWindow.hide(); } });