AnsweredAssumed Answered

apply edits for query results

Question asked by thebillcarr on May 9, 2014
Latest reply on Jul 30, 2015 by thebillcarr
I am attempting to pass query results to  a function to update the features geometry.

[HTML]       function addGraphic(pt){
          var symbol = new SimpleMarkerSymbol(
            SimpleMarkerSymbol.STYLE_CIRCLE,
            12);
        
          graphic = new Graphic(pt, symbol,null);
          map.graphics.add(graphic);
         
  
         var query = new Query();
  query.where = "OBJECTID = 1";
 
  featureLayer.queryIds(query, function(objectIds) {
    //do something with the objectIds here
  }); 
            
         
          new esri.geometry.Point(pt, map.spatialReference);
         
          var newFeature = new esri.Graphic(geometry, null,null);
           graphic.setGeometry(pt);
         
  
          
                  console.log("prepare to fire");
featureLayer.applyEdits( null,[graphic], null);
          console.log(" Fire on everything!");
          [/HTML]

It runs through the console logs but comes up with a "x.attributes is null" error in the console. I haven't worked much with selectFeatures, so bare with me for any obvious mistakes. Any Ideas?

Outcomes