AnsweredAssumed Answered

applyEdits not sending all attributes

Question asked by brysageek on Sep 12, 2017

attempting to to simple update on feature: something like this..


String finalFireNumber = "000-000-000-000"


var relatedPerimeters  = await ((ArcGISFeatureTable)MapHelper.IncidentsPointFeatureLayer.FeatureTable)
.QueryRelatedAsync(Convert.ToInt32(_selectedIncidentFeature.Attributes["OBJECTID"]), 0);


if (relatedIncidentPerimeters != null && relatedIncidentPerimeters.Count > 0)
   foreach (var perimeter in relatedIncidentPerimeters)
      perimeter.Geometry = GeometryEngine.Project(perimeter.Geometry, new SpatialReference(102100));
      perimeter.Attributes["IncidentNumber"] = finalFireNumber;

      await MapHelper.IncidentsFirePerimetersFeatureLayer.FeatureTable.UpdateAsync(perimeter);
      incidentsInstance.SelectedIncidentPerimeter = perimeter;

var perimeterUpdates =
   await ((ServiceFeatureTable) MapHelper.IncidentsFirePerimetersFeatureLayer.FeatureTable)


When I look at the post to the service in transit I see that it is leaving the IncidentNumber out -- ? why is that?



here is the json of the feature I am trying to update on the applyeditsasync()




I am not sure as to why the attributes would be getting left out, I can also see that after the updateAsync call that my feature does get updated and the hasEdits property is set to true.  Looking at server logs there are not any errors and the values does exceed length and is the proper type.


Using the WPF Runtime 10.2.7



**** UPDATE ****

so adding 

  ((ServiceFeatureTable)MapHelper.IncidentsFirePerimetersFeatureLayer.FeatureTable).OutFields = new OutFields(new [] {"*"});


and casting all calls to MapHelper.IncidentsFirePerimetersFeatureLayer.FeatureTable as ServiceFeatureTable seems to be the fix