Hi All,
I am trying to get a field index of a hosted Parcel Fabric featureclass in a mapview but it seems to be returning the 'wrong' index. I have the Fabric hosted on Portal so we are editing the branch-versioned feature service. When I call the typical methods to get the indexes:
var Parcels = MapView.Active?.Map.GetLayersAsFlattenedList().FirstOrDefault(fl => fl.Name == "Fabric Tax Parcels") as FeatureLayer;
int indx = Parcels.GetFeatureClass().GetDefinition().FindField("name");
or
int indx = Parcels.GetTable().GetDefinition().FindField("name");
...they both return 1. 1 is the correct index in the actual geodatabase featureclass, but in the mapview index 1 is GlobalId...so I'm getting globalid values returned rather than the desired 'name' field.
I'm assuming this isn't specific to the Parcel Fabric rather to branch-versioned/hosted feature services but I'm just using that as my example.
Any help would be great!
Thanks
Mike