AnsweredAssumed Answered

Dynamic Layer Query Results Not Returning Fields

Question asked by msudac on Nov 9, 2014
Latest reply on Oct 21, 2015 by ChristinaElaine

I have tried both SDE and shapefile dynamic layers. Every layer that I try is failing in the same way.


If I do the following:

var featureTable = new ServiceFeatureTable() {

     ServiceUri = dynamicLayer.ServiceUri + "/dynamicLayer",

     Source = dynamicLayer.DynamicLayerInfos[0].Source};

await featureTable.InitializeAsync();

I get an exception -> {"\"key not found\" : "}

   at RuntimeCoreNet.Interop.HandleException(Boolean retVal)

   at RuntimeCoreNet.CoreFeatureSource..ctor(String path, String featureServiceJson, CoreSpatialReference sr_override)

   at Esri.ArcGISRuntime.Data.ServiceFeatureTable.CreateFeatureSource(SpatialReference sr_override)

   at Esri.ArcGISRuntime.Data.ServiceFeatureTable.<>c__DisplayClass5f.<InitializeAsyncInternal>b__5d()

   at System.Threading.Tasks.Task.InnerInvoke()

   at System.Threading.Tasks.Task.Execute()


If I take a step back and try to query the service as follows:

QueryTask queryTask = new QueryTask(new Uri(dynamicLayer.ServiceUri + "/dynamicLayer"));

                    var query = new Query("1=1");

                    query.ReturnGeometry = true;


                    query.Source = dynamicLayer.DynamicLayerInfos[0].Source;

                    var queryResult = await queryTask.ExecuteAsync(query);

                    var featureSet = queryResult.FeatureSet;


My FeatureSet has 1 field (the Oid field). The graphics returned have 1 attribute (the Oid field). But I know these layers have other fields that are not being returned. In fact I can load an equivalent service and query in the same fashion in the WPF implementation that I came from and all of the fields are returned. I need to be able to label my SDE layers with more than just the Oid column. I'm certain it's not my data because I can reproduce with any of the shapefiles from the samples. Please tell me this isn't broken!!!