Liz, You have several coding issue here: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";
}