I think what you can do is first know the groups, which you can do by: foreach (Field field in fl.LayerInfo.Fields) { if (field.Domain is CodedValueDomain) { CodedValueDomain domain = field.Domain as CodedValueDomain; foreach (var item in domain.CodedValues) { //item.Key is an object this is what you need in your query } } } If your FeatureLayer was HomelandSecurity as in my previous post, you can see that ftype is CodedValueDomain and you can perform your query where "ftype = 10801".
foreach (Field field in fl.LayerInfo.Fields) { if (field.Domain is CodedValueDomain) { CodedValueDomain domain = field.Domain as CodedValueDomain; foreach (var item in domain.CodedValues) { //item.Key is an object this is what you need in your query } } }
Do you mean this?In this feature service http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/0ftype is CodedValueDomain, each number represent a category that can be one of the following values (Hydro-Meteorlogical, Public Health, ... Vehicle)If I want to see only features that are "Vehicle", my query's Where is "ftype = 10801"
You can set your query's OutFields property so that it will return only the fields that you want it to return. query.OutFields.AddRange(new string[] { "FIELD_NAME" });
query.OutFields.AddRange(new string[] { "FIELD_NAME" });
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.