Select to view content in your preferred language

Attribute inspector shows label from toc instead of attribute value subtype

841
0
11-24-2011 09:21 PM
AntonNovichikhin
Deactivated User
There is a map with a simple layer from multiuser geodatabase. Let in be Points_layer.

Points_layer has a field with a type Short Integer and values [0,1,2,...] assigned to features and
some other fields (any or none).

I created a map service with feature access capabilities. (Data came from SQL Server under AGS Server Enterprise Standard license 10.0 sp2)

I created a simple application which displays mapservice layer and feature layer (everything as described in examples in flex api help)

Then I use select operation to select a feature and use Attribute Inspector Component to display  attributes. (All code works well for other fields with no errors, but in cases when using subtypes it behaves improperly)

Example 1: we defined a subtype for a feature
e.g. 0 - "Red". 1 - "Green", 2 - "Yellow"

case 1: layer (in a map document) was displayed using single symbol renderer
In the attribute inspector we will see only the numeric value of the field
we will see: 0 as a value in attributeinspector

case 2: layer (in a map document) was displayed using categories and all categories (all possible values are enabled)
we will see: Red - as a value in attributeinspector

In the attribute inspector we will see correct description only if we didn't edit the label text in symbology tab in layer properties.

If we changed that "label for ArcMap legend" - we will see that text in attribute inspector in flex application
we will see: Red_edited_label_for_legend

case 3: layer (in a map document) was displayed using categories and some categories were grouped
In the attribute inspector we will a label for two categories as in case2.
we will see Red; Green for example, if we grouped 0 and 1 values in symbology tab.

Attribute inspector should not take any "legend related information", it should use only information from data feature class such as attribute values, subtype descriptions, domain codes' descriptions.

Any suggestions or comments?
Tags (2)
0 Kudos
0 Replies