Hi there
We're currently trying to allow search for field contents on subtype sublayers. While we're able to display the SubtypeFeatureLayers as well as its sublayers being deployed in a webmap or a mobile map, we're somehow struggling to find a suitable approach for querying data from the sublayers.
What would be the correct way of getting a "table" per sublayer? Of course we can access the sublayer's parent layer and grab the ServiceFeatureTable there (copying its url and create a new instance of it) and assign a definition expression to it. But is this the intended approach?
The DefinitionExpression on the SubtypeSublayer is always empty, the MapServiceSublayerInfo is always null.
Cheers,
Michael
SubtypeSublayers only controls display. In order to query a SubtypeSublayers you will have to query the SubtypeFeaturelayer's table. To narrow down data for the SubtypeSublayer, you can set the where clause in the QueryParameters to include a check for the subtype code .
((ArcGISFeatureTable)subtypeFeatureLayer.FeatureTable).LayerInfo.SubtypeField + " = " + subtypeSublayer.Subtype.Code
Hi Tom
Thanks for your reply. That's the way we're doing it right now. Although it works for most of our use cases, it's a bit cumbersome sometimes. And it behaves completly different than the way it does in ArcGIS Pro (where the Subtype Group Layer effectively gets treated as a group layer, does not offer any feature access but through its Subtype Layers). Is there any chance that the API might be adapted or extended to offer a way to access subtype group/featuer layers as "kind-of" group layers? If so, what would be the expected time frame/version?