Select to view content in your preferred language

how do you know the name of the field?

561
1
12-21-2011 08:53 PM
DidarBultanov
Emerging Contributor
I get the data using the identification
I need to know the name of the field, not alias
 private void Search_Num(object sender, IdentifyEventArgs args)
        {
............
 if (args.IdentifyResults.Count > 0)
result.Feature.Attributes["My_field"] != null 
- then returned to no-name field, and the alias
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
IdentifyTask use Alias but you can use Linq query to find the Field.Name.

If you are using 2.3 and up, you can use GetDetails/GetAllDetails to get to the FeatureLayerInfo.
GetDet
http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.ArcGISDyna...

  l.GetDetails(layerId, 
    (a, b) =>
    {
     var field = a.Fields.FirstOrDefault(f => f.Alias == alias);
    }
   );

where l is ArcGISDynamicMapServiceLayer that points to the same MapServer as your IdentifyTask and alias is from IdentifyTask.
0 Kudos