Select to view content in your preferred language

Specific fields from QueryFeaturesAsync()

1095
4
04-16-2018 07:48 AM
Mike_Quetel
Frequent Contributor

The QueryFeaturesAsync() method on ServiceFeatureTable supports an overload that allows some control over the fields returned by including a QueryFeatureFields enum value.  These values are IdsOnly, Minimum, and LoadAll. 

I have two questions: 

  1. Is there no capability in the SDK to pass in a list of out fields (or *) to more finely control what comes back? (The rest interface supports this)
  2. I can't find any documentation on the behavior for the Minimum enum value.  IdsOnly and LoadAll are pretty self explanatory.
0 Kudos
4 Replies
NagmaYasmin
Esri Contributor

Hi Mike,

 

To answer your second question, the "Minimum" value for QueryFeatureFields requests the minimum set of fields to render the feature on a map like geometry, ID, and fields needed for the renderer and labels. 

Hope that helps.

dotMorten_esri
Esri Notable Contributor

1st part of the question: Use the QueryFeatureFields parameter when querying for data:

https://developers.arcgis.com/net/latest/wpf/api-reference//html/M_Esri_ArcGISRuntime_Data_ServiceFe...

Alternatively, you can call "LoadAsync()" on a feature and it'll fetch the full data. This is especially useful if you identify a feature layer, because the feature you get back will then only have the minimum needed to render, and the geometry might be generalized (this is all done to make the rendering as fast as possible by reducing network load). Performing the full load of a feature would be required before editing it anyway.

Mike_Quetel
Frequent Contributor

Morten Nielsen I guess I was inquiring if there was anything that offers more granular control of what gets returned then is provided by QueryFeatureFields.  Something in between, minimal and everything.  Consider the rest API's ability to take a delimited list in out fields in the query task:

0 Kudos
dotMorten_esri
Esri Notable Contributor

At this point, no there is not.