Thanks for looking at it. I guess I was just wondering if the function from that sample would even do what I want? I kind of realized the code I showed wasn't correct and would need some changes.
private function addImage_clickHandler(event:MouseEvent):void { const roomsTableLayer:Object = { object: selectedGraphic.attributes.objectid, datetime: new Date().getTime(), agree_with_incident: 1 }; //And here you are using the same constant name again, this is no good. const roomsTableLayer:Graphic = new Graphic(null, null, roomsTableLayerAttributes); //And here you are using the same constant name again, this is really no good. const roomsTableLayer:FeatureLayer = new FeatureLayer("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/1"); roomsTableLayer.addEventListener(FeatureLayerEvent.EDITS_COMPLETE, roomsTableLayer_editsCompleteHandler); //Now you are trying to apply voteRecord which does not exist in your code to the table roomsTableLayer.applyEdits([ voteRecord ], null, null); } private function roomsTableLayer_editsCompleteHandler(event:FeatureLayerEvent):void { count++; peopleCount.text = count + " people think this is important"; }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.